By CNS Web on Thursday, 23 July 2015
Replies 23
Likes 0
Views 1.5K
Votes 0
After upgrading to EasyBlog 5 on my multisite install (using AlterBrains -MightySites) I am having a SQL issue.

The main site that I have done the upgrade from works fine, but I get a SQL error on the other multisites.

1054 Unknown column 'e.custom_css' in 'field list' SQL=select u.*, e.`id` as `eb_id`, e.`nickname`, e.`avatar`, e.`description`, e.`url`, e.`params` as `eb_params`, e.`published` as `eb_published`, e.`title` as `eb_title`, e.`biography`, e.`permalink`, e.`custom_css` from `wdev2_users` as u left join `ssc_easyblog_users` as e ON u.`id` = e.`id` where u.`id` = 972 


It seems like the tables need to be updated for the other multi sites, but I am unsure how to go about this. I've tried going to Extension Manager-> Database -> Fix but this doesn't help.

Thanks.
Hi,

I am sorry for the late reply.

I am not sure how can I replicate this. However, it seems to be a missing column in the database. Perhaps, you can try run this sql in the database since we added this column in EasyBlog5.

alter table #_easyblog_users add column `custom_css` text;


If the issue is still persist, perhaps you can provide us the backend access and FTP access to your site so that we can inspect this issue directly.
Please advise.
·
Thursday, 23 July 2015 11:09
·
0 Likes
·
0 Votes
·
0 Comments
·
I appreciate the reply. I now have a different error
Unknown column 'state' in 'where clause' SQL=SELECT COUNT(1) FROM `ssc_easyblog_post` WHERE `published`!='9' AND `state`='0' 


This is when I try to access EasyBlog from the admin panel.

Any ideas? Thanks.
·
Thursday, 23 July 2015 22:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Is there a way to run the new Maintenance -> Database tool on my multisites? I can't get to the admin panel on those sites, but it seems like the issue is that those tables haven't been updated.
·
Thursday, 23 July 2015 22:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

Hm, how was the update done? I am not really sure how multi-sites is rendering the installer but we have actually split our SQL queries into multiple files to avoid issues with "mysql timing out". You can find it under the folder /administrator/components/com_easyblog/updates/
·
Friday, 24 July 2015 00:35
·
0 Likes
·
0 Votes
·
0 Comments
·
The update was done by downloading the EasyBlog Launcher to my local machine and uploading to my Joomla install on what I consider the 'main' multisite.

The launcher ran successfully without errors, however only that site has a working EasyBlog install. My other sites give the SQL error in my earlier posts.

I'll take a look at the easy_blog/updates folder to see if that helps. Maybe running the sql updates by hand will work.
·
Friday, 24 July 2015 00:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark,

I am only seeing one file named posts.json at /administrator/components/com_easyblog/updates/

Am I missing something?
·
Friday, 24 July 2015 00:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

Hm, you should be seeing these folders, http://screencast.com/t/Ti42bI15s
·
Friday, 24 July 2015 00:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah, yes I do see the folder just as in your screen shot.

In the 5.0.16 folder I only see posts.json. I assumed the other were for older versions, but perhaps I am mistaken?
·
Friday, 24 July 2015 00:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

If you are upgrading from 3.x, anything above it up till 5.0.16 will need to be executed
·
Friday, 24 July 2015 00:56
·
0 Likes
·
0 Votes
·
0 Comments
·
What is the best way to execute these files? Is there a script that will go through them all?

Any advice is welcome, thanks
·
Friday, 24 July 2015 01:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

Hm, you could try running the script below,


EB::db()->sync('3.9.xxx');


Replace the version that you are upgrading from.
·
Friday, 24 July 2015 01:02
·
0 Likes
·
0 Votes
·
0 Comments
·
How would I specify the table prefixes with that method? I'm assuming that if this works I would need to run this for each multisite.

Thanks.
·
Friday, 24 July 2015 01:12
·
0 Likes
·
0 Votes
·
0 Comments
·
The table prefixes are inherited from your configuration.php file.
·
Friday, 24 July 2015 02:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

I'm sure my ignorance is to blame, but how exactly do I run the command? I've tried putting it in a php file and running from command line. But I just get a class 'EB' not found error.

I'm pretty sure I need to include some Joomla libraries or something so PHP knows what EB is. I'll keep digging, I know it's late where you are.
·
Friday, 24 July 2015 03:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

Hm, I think you should place these codes in /administrator/components/com_easyblog/easyblog.php so that when you access the back end, it'll run immediately
·
Friday, 24 July 2015 03:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Alright, while this does appear to be doing something...I'm still not able to get things working. I tried several things just in case I misunderstood what the intention was.

If I run the code with EB::db()->sync('3.7.13964'); which is the version of easyblog I was on. I get the following error
1146 Table 'wdev2.ssc_easyblog_post_templates' doesn't exist SQL=SHOW FIELDS FROM `ssc_easyblog_post_templates` 


Then I tried just the version I was on
EB::db()->sync('5.0.16');

But got this error
1146 Table 'wdev2.ssc_easyblog_revisions' doesn't exist SQL=SELECT MAX(`ordering`) FROM `ssc_easyblog_revisions` WHERE `post_id`='3702' 


Then I thought maybe I needed to run all the versions up to 5.0.16 so I tried
EB::db()->sync('3.9');
EB::db()->sync('5.0.1');
EB::db()->sync('5.0.14');
EB::db()->sync('5.0.15');
EB::db()->sync('5.0.16');
But got this error
1146 Table 'wdev2.ssc_easyblog_post_templates' doesn't exist SQL=SHOW FIELDS FROM `ssc_easyblog_post_templates` 


From the front end of this multisite I get the attached screenshot when trying to access the blog
·
Friday, 24 July 2015 04:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

Ah, looks like the missing tables need to be created. The /updates/ folder only updates existing database tables on the site. You would also need to run the queries in the folder /queries/ which is the "initialization" of missing tables.
·
Friday, 24 July 2015 16:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Maybe it's because I haven't had my morning coffee yet, but where is this queries folder? I'm not seeing it in administrator/components/com_easyblog or in componenents/com_easyblog.

Then I'm assuming I would edit the queries to include my table prefix and run them for each multisite.

Edit: I did find install.mysql.utf8.sql.backup which contains some SQL. I may try that on a dev site.
Edit 2: install.mysql.utf8.sql.backup doesn't seem to conatain anything about '_easyblog_post_templates' so this doesnt seem like it would help. I'll keep looking for a queries folder.
Edit 3: Ah, I think I found what you are referring too. If I unzip the installer from my local machine I can see a queries folder.
·
Friday, 24 July 2015 20:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok, progress is being made. But not quite there yet.

I ran all of the SQL found in the /queries folder.
Then I ran the EB::db()->sync('3.7.13964');

Now I do not get any SQL errors, but on my Frontpage view I get the message 'There are no blog posts available yet currently'.
On the backend things look ok, until I try to edit a post. See attached screenshot, there is no formatting being applied.

Any ideas? It seems so close to working again. Your help is greatly appreciated, unfortunately I am approaching the time where I may need to go back to a previous site backup. I have users unhappy that their blogs are down
·
Friday, 24 July 2015 21:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok, I think I have finally worked this out.

For each multisite I ran the scripts from the queries folder.(changing the table prefix each time)
Then I made sure to go to Extension Manager -> Discover and Install everything
Then Extension Manager -> Database -> Fix
Then I edited easyblog.php to run the updates
EB::db()->sync('3.7.13964');
EB::db()->sync('3.9');
EB::db()->sync('5.0.1');
EB::db()->sync('5.0.14');
EB::db()->sync('5.0.15');
EB::db()->sync('5.0.16');

After that I went into the EasyBlog admin panel to Maintenance and ran all of the possible scripts. I also ran the database tool there as well.

The last issue I cam across what that the 'Archive' module is broken. If enabled the page just goes all white with a broken '2015' link. For now I have just disabled the archive module. I may open a new forum topic to address this, but for now I'm fine with it disabled.

I sincerely appreciate all of your help. Thank you.
·
Friday, 24 July 2015 23:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

Can I know what errors are being generated when you turn on the Archive module?
·
Saturday, 25 July 2015 00:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Well, I can't seem to replicate the Archive issue on my dev site. So it must be something wrong with my production. I'll investigate further. This may be over a week before I can work on this again, taking a vacation

Edit:

Took a quick look with firebug. I get the following error when the archive module is attempting to load on a page. It is a blank white screen with '2015', none of the site loads.
ReferenceError: EasyBlog is not defined
EasyBlog.ready(function($) {
·
Saturday, 25 July 2015 04:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

Hm, there could be a possibility that this archive module is from an older version. Try deleting the module and creating it again under Module manager and see if that helps?
·
Saturday, 25 July 2015 13:18
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post