0

I installed Magento 2.3 successfully, with custom style sheet and Mageplaza Blog ext which all works fine. I wanted to install a slider module and I have done this through ssh. Composer installs the module, and enables it (see below):

/usr/bin/php71 bin/magento module:enable Mageplaza_Productslider The following modules have been enabled: - Mageplaza_Productslider To make sure that the enabled modules are properly registered, run 'setup:upgrade'. Cache cleared successfully. Generated classes cleared successfully. Please run the 'setup:di:compile' command to generate classes. Info: Some modules might require static view files to be cleared. To do this, run 'module:enable' with the --clear-static-content option to clear them.

On setup:upgrade I saw this error message:

Cache cleared successfully File system cleanup: /home/sites/10a/b/bb15557fe1/public_html/generated/code/Composer /home/sites/10a/b/bb15557fe1/public_html/generated/code/Dotdigitalgroup /home/sites/10a/b/bb15557fe1/public_html/generated/code/MSP /home/sites/10a/b/bb15557fe1/public_html/generated/code/Magento /home/sites/10a/b/bb15557fe1/public_html/generated/code/Symfony /home/sites/10a/b/bb15557fe1/public_html/generated/code/Yotpo The directory '/home/sites/10a/b/bb15557fe1/public_html/generated/metadata/' doesn't exist - skipping cleanup /home/sites/10a/b/bb15557fe1/public_html/pub/static/deployed_version.txt /home/sites/10a/b/bb15557fe1/public_html/pub/static/frontend /home/sites/10a/b/bb15557fe1/public_html/var/view_preprocessed/pub Updating modules: Schema creation/updates: SQLSTATE[HY000]: General error: 1826 Duplicate FOREIGN KEY constraint name 'magento@002d31333398d2/MAGEPLAZA_BLOG_POST_AUTHOR_ID_MAGEPLAZA_BLOG_AUTHOR_USER_ID', query was: ALTER TABLE mageplaza_blog_post MODIFY COLUMN name varchar(255) NULL COMMENT "Post Name", MODIFY COLUMN image varchar(255) NULL COMMENT "Post Image", MODIFY COLUMN views int(11) NULL COMMENT "Post Views ", MODIFY COLUMN url_key varchar(255) NULL COMMENT "Post URL Key", MODIFY COLUMN meta_title varchar(255) NULL COMMENT "Meta Title", MODIFY COLUMN created_at timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT "Post Created At", MODIFY COLUMN updated_at timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT "Post Updated At", MODIFY COLUMN author_id int(10) UNSIGNED NULL COMMENT "Author ID", MODIFY COLUMN modifier_id int(10) UNSIGNED NULL COMMENT "Author ID", MODIFY COLUMN publish_date timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT "Post Updated At", ADD CONSTRAINT MAGEPLAZA_BLOG_POST_AUTHOR_ID_MAGEPLAZA_BLOG_AUTHOR_USER_ID FOREIGN KEY (author_id) REFERENCES mageplaza_blog_author (user_id) ON DELETE CASCADE

on static-content:deploy I got:

Execution time: 70.554099082947 -bash-4.1$ /usr/bin/php71 bin/magento setup:static-content:deploy en_GB -f

Deploy using quick strategy frontend/Magento/blank/en_GB 2390/2390 ============================ 100% 11 secs
adminhtml/Magento/backend/en_GB 2466/2466 ============================ 100% 12 secs
frontend/Magento/luma/en_GB 2407/2407 ============================ 100% 13 secs
frontend/Fishlock/southernsculptures/en_GB 2410/2410 ============================ 100% 12 secs

Execution time: 67.238442897797 -bash-4.1$ The following modules are outdated: -bash: The: command not found

The extensions I installed didn't appear in the back end or on my database and the error report said:

Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. The following modules are outdated: Mageplaza_Productslider data: current version - none, required version - 1.1.0

I retried php bin/magento setup:upgrade php bin/magento setup:static-content:deploy flushing cache and reindexing but nothing changed so disabled Mageplaza_Productslider and removed the files. I cleared all the caches, re-indexed, and deleted var cache. Then ran: static-content:deploy and the error had gone from there. So I ran setup:upgrade, but the same error as above was still apparent (this is connected to the MAGEPLAZA_BLOG module that is currently running). I then ran /usr/bin/php71 bin/magento setup:db:status and I get:

Declarative Schema is not up to date Run 'setup:upgrade' to update your DB schema and data.

How do I get rid of the ****SQLSTATE[HY000]: General error: 1826 Duplicate FOREIGN KEY constraint name 'magento@002d31333398d2/MAGEPLAZA_BLOG_POST_AUTHOR_ID_MAGEPLAZA_BLOG_AUTHOR_USER_ID', query was: ALTER TABLE mageplaza_blog_post MODIFY COLUMN name varchar(255) NULL COMMENT "Post Name", MODIFY COLUMN image varchar(255) NULL COMMENT "Post Image", MODIFY COLUMN views int(11) NULL COMMENT "Post Views ", MODIFY COLUMN url_key varchar(255) NULL COMMENT "Post URL Key", MODIFY COLUMN meta_title varchar(255) NULL COMMENT "Meta Title", MODIFY COLUMN created_at timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT "Post Created At", MODIFY COLUMN updated_at timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT "Post Updated At", MODIFY COLUMN author_id int(10) UNSIGNED NULL COMMENT "Author ID", MODIFY COLUMN modifier_id int(10) UNSIGNED NULL COMMENT "Author ID", MODIFY COLUMN publish_date timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT "Post Updated At", ADD CONSTRAINT MAGEPLAZA_BLOG_POST_AUTHOR_ID_MAGEPLAZA_BLOG_AUTHOR_USER_ID FOREIGN KEY (author_id) REFERENCES mageplaza_blog_author (user_id) ON DELETE CASCADE**** error

and will this sort my db issue out if I do? I don't understand how the extension connected to this issue is working ok if this is the issue? I would be grateful of any insights and thankyou in advance :)

0

have you get solution of this question?

| improve this answer | |
0

Did you get the solution for the same? I am also facing the same problem with Mageplaza blog extension.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.