Blog-plugin: Fresh install gives SQL errors

Created on 4 Aug 2018  路  5Comments  路  Source: rainlab/blog-plugin

I'm getting an sql error during install when adding project id to the October backend, as well as when you subsequently try to install the plugin.

Steps to replicate:

  • Downloaded the OctoberCMS installer and run it, without picking a project id, just setup as a fresh project.
  • Goto the plugins section of the admin area and add an existing project id that has just the blog attached to it, it'll try installing.
  • During install it'll fail with the following error message:

"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site.rainlab_blog_posts' doesn't exist (SQL: alter table `rainlab_blog_posts` add `seo_title` varchar(191) null, add `seo_description` varchar(191) null, add `seo_keywords` varchar(191) null, add `canonical_url` varchar(191) null, add `redirect_url` varchar(191) null, add `robot_index` varchar(191) null, add `robot_follow` varchar(191) null)" on line 664 of /home/vagrant/projects/site/vendor/laravel/framework/src/Illuminate/Database/Connection.php

This is a 100% fresh installation on a Laravel Homestead box, running Nginx and PHP 7.2. I've retried the install, wiping October completely twice and get the same result every time.

Question

Most helpful comment

@rickmills this is the result of a separate plugin (probably a SEO plugin from the looks of it) attempting to modify the blog database tables before they exist. Make sure that the project ID that you are using really only has the blog plugin attached, and contact the author of the SEO plugin that is being used to let them know that their plugin isn't properly defining a dependency on the blog plugin.

All 5 comments

@rickmills this is the result of a separate plugin (probably a SEO plugin from the looks of it) attempting to modify the blog database tables before they exist. Make sure that the project ID that you are using really only has the blog plugin attached, and contact the author of the SEO plugin that is being used to let them know that their plugin isn't properly defining a dependency on the blog plugin.

Thanks, I'll dig into it more and try again :)

I just receive similar error right after adding SEO plugin:
`
Update failed

"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.rainlab_blog_posts' doesn't exist (SQL: alter table rainlab_blog_posts add seo_title varchar(191) null, add seo_description varchar(191) null, add seo_keywords varchar(191) null, add canonical_url varchar(191) null, add redirect_url varchar(191) null, add robot_index varchar(191) null, add robot_follow varchar(191) null)" on line 664 of D:\wamp64\www\bparlanweb\vendor\laravel\framework\src\Illuminate\Database\Connection.php
`

Problem is, even though I remove plugin from october's project section from web, my localhost/backend stuck at error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.martin_forms_records' doesn't exist (SQL: select count(*) as aggregate frommartin_forms_recordswhereunread= 1 andmartin_forms_records.deleted_atis null)

@bparlan The plugin files are probably still in your installation, even though you may have removed it from the October project management interface. If you delete the plugin files locally, it should hopefully work.

@bennothommo actually I remove files from plugins folder but SQL error kept persisting when I go to /backend, and site kept working. Since it was fresh install, I didn't bother a lot with error message and after removing plugin from project account over OctoberCMS's website and removing db from phpmyadmin I made clear start again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HitArrowLegend picture HitArrowLegend  路  6Comments

daveharrisonnet picture daveharrisonnet  路  9Comments

MaTToX3 picture MaTToX3  路  6Comments

HugoBossOD picture HugoBossOD  路  5Comments

AugmentBLU picture AugmentBLU  路  3Comments