Support Forum

Database issues after upgrading manually to 5.5.1

BD Bruce Dienes
Bruce Dienes
Member

Looks like I may have messed things up…

The site is upgraded to WP 4.0 (multisite) so I wanted to upgrade SP to 5.5.1

In the Network Admin panel there was no option to upgrade from 5.5.0.1 to 5.5.1 (SP is not network activated – not sure if that is an issue, but it never has been before. I’m only using it on about 6 subsites out of the 30 total.)

In the subsite, it asked for the upgrade, said to click and go to upgrade, but when I did, it just went to the Network Upgrade page and there was no option. So I clicked on the manual update link, downloaded SP 5.5.1 zip file. When I went to install it, of course WP told me the directory already existed. So I moved the old SP plugin directory elsewhere and unzipped the new one into plugins.

When I went back to the subsite plugins menu it asked me to upgrade the database, so I did. Everything looks fine, and I can access the Forum controls in the dashboard, and I can see the forum structure when I go to it, but every post I try to open says “Access denied – you do not have permission to view this page” and there is a green box that appears at the top of the window saying there is an “Invalid database query”.

When I go to the SP dashboard, and try to list Users, none show up, but if I search for a user, they appear. The user groups are populated with the correct users. It seems that there may be a fix to repair the user list? I assume that is why access is denied – the users are not being recognized as authorized to view?

I do have a backup of the WP database but it was not done immediately prior to the SP upgrade (I know, I know…) so if a simple fix is available I would rather take that route.

Any thoughts?

Brucefrown

13 Answers

New Answer

MP Mr Papa
Mr Papa
Member

a little confused…  if its not networked activated, just visit the dashboard of each network site and update…

where did you copy the ‘old’ version?  if still in plugins, its likely causing a conflict since wp still loads part of it…

there should be more info on the invalid db query in the forum – toolbox – error log admin panel…

might be worth trying forum – toolbox – houskeeping and try clearing the auths cache…

BD Bruce Dienes
Bruce Dienes
Member

I did do the update on the subsites – that is what seemed to cause the trouble.

Yes, I had moved the old simple-press folder out of the plugins directory.

I tried clearing the auths cache – no effect.

I’ve attached the top of the error log.

BD Bruce Dienes
Bruce Dienes
Member

I tried a few things – I can create a post and I can delete that post. But I cannot view it.

YS Yellow Swordfish
Yellow Swordfish
Member

Let’s find out what the DB error is. That is probably enough to stop the posts display from populating and thus giving the impression that access is not allowed.

Go to the forum admin on one of the sites. Select Toolbox > Error Log. Ignore what is there and scroll down to the bottom and clear it out.

Run a forum page so that you see the ‘Invalid Database Query’ message. Back to the error log. Copy and paste the contents here so we can take a look at the problem.

BD Bruce Dienes
Bruce Dienes
Member

I cleared the error log and immediately got three error notices. After trying to access a post, I got the rest. (see error log below)

The “where clause” error appears after opening the forum. The “field list” one occurs after trying to open a post and getting the “Access Denied …” notice.

Note that in addition to not gaining access to the posts, the list of SP users does not display in the dashboard, although an SP user will display when searched for. (see screenshot below).

SP-user-list-not-showing.jpg

 Error log follows:

October 18, 2014 8:52 am | spaErrError | 1 | database

file: /var/problem-with-post-edit-buttonome/quakerca/quaker.ca/www/wp-content/plugins/simple-press/forum/content/classes/sp-topic-view-class.php

line: 238

function: select

error: Unknown column ‘attachments’ in ‘field list’

SELECT group_id, wpmu_43_sftopics.topic_id, wpmu_43_sftopics.forum_id, topic_name, topic_slug, topic_status, topic_pinned, topic_icon, topic_opened, wpmu_43_sftopics.post_count, forum_slug, forum_status, forum_disabled, forum_rss_private, wpmu_43_sfposts.post_id, post_date, wpmu_43_sfposts.user_id, guest_name, guest_email, post_status, post_pinned, post_index, post_edit, poster_ip, source, post_content, wpmu_43_sfwaiting.post_count AS new_post, attachments, polls, poll, topic_subs, use_tags, topic_desc FROM wpmu_43_sftopics JOIN wpmu_43_sfposts ON wpmu_43_sftopics.topic_id=wpmu_43_sfposts.topic_id JOIN wpmu_43_sfforums ON wpmu_43_sftopics.forum_id=wpmu_43_sfforums.forum_id LEFT JOIN wpmu_43_sfwaiting ON wpmu_43_sfposts.post_id=wpmu_43_sfwaiting.post_id WHERE wpmu_43_sftopics.topic_id=48 ORDER BY post_pinned DESC, wpmu_43_sfposts.post_id ASC LIMIT 0, 20

October 18, 2014 8:52 am | spaErrNotice | 1 | php

file: e/quakerca/quaker.ca/www/wp-content/sp-resources/forum-plugins/tags/library/sp-tags-components.php

line: 63

function: sp_tags_do_new_topic_form

Notice | Undefined index: editor

October 18, 2014 8:52 am | spaErrNotice | 1 | php

file: e/quakerca/quaker.ca/www/wp-content/sp-resources/forum-plugins/plupload/library/sp-plupload-forms.php

line: 10

function: sp_plupload_do_uploader_form

Notice | Undefined index: editor

October 18, 2014 8:52 am | spaErrNotice | 1 | php

file: e/quakerca/quaker.ca/www/wp-content/sp-resources/forum-plugins/polls/library/sp-polls-components.php

line: 67

function: sp_polls_do_create_poll_form

Notice | Undefined index: editor

October 18, 2014 8:52 am | spaErrNotice | 1 | php

file: /simple-press/forum/content/forms/sp-form-topic.php

line: 16

function: sp_render_add_topic_form

Notice | Undefined index: editor

October 18, 2014 8:52 am | spaErrNotice | 1 | php

file: /simple-press/forum/content/forms/sp-form-components.php

line: 22

function: include_once

Notice | Undefined index: editor

October 18, 2014 8:52 am | spaErrError | 1 | database

file: /var/problem-with-post-edit-buttonome/quakerca/quaker.ca/www/wp-content/sp-resources/forum-plugins/plupload/sp-plupload-plugin.php

line: 189

function: sp_plupload_do_forumview_query

error: Unknown column ‘attachments’ in ‘where clause’

SELECT topic_id FROM wpmu_43_sfposts WHERE wpmu_43_sfposts.topic_id IN (48,55,54,53,52,49,46,42,38,5,32,29) AND attachments IS NOT NULL

October 18, 2014 8:52 am | spaErrNotice | 11 | php

file: e/quakerca/quaker.ca/www/wp-content/sp-resources/forum-plugins/tags/sp-tags-plugin.php

line: 84

function: include_once

Notice | Undefined index: editor

October 18, 2014 8:52 am | spaErrNotice | 11 | php

file: e/quakerca/quaker.ca/www/wp-content/sp-resources/forum-plugins/post-preview/sp-preview-plugin.php

line: 38

function: include_once

Notice | Undefined index: editor

October 18, 2014 8:52 am | spaErrNotice | 11 | php

file: e/quakerca/quaker.ca/www/wp-content/sp-resources/forum-plugins/plupload/sp-plupload-plugin.php

line: 59

function: include_once

Notice | Undefined index: editor

YS Yellow Swordfish
Yellow Swordfish
Member

Apologies for taking so long to get back to you. i had to go out.

We are only really interested in the actual error here (the first one). The rest are just annoying notices and suggest some admin panels that have never been visited or saved. Not really an issue.

I think you will find that while you have updated WP and the SP core – you have SP plugins that have NOT been updated and need to be. Like the uploader for example. Can you please update any that state they need it and then try running the forums again.

BD Bruce Dienes
Bruce Dienes
Member

OK. But there is no option in WP either in the subsite or in the network admin to auto-update any of the plugins. I will have to manually update each one. Is the best way to ftp up to the server then unzip into the plugin’s specific directory?

MP Mr Papa
Mr Papa
Member

correct, no network upgrade of plugins…  not sure its needed…  just upgrade the plugins on the main site (where the plugins are loaded) through the main wp dashboard updates and they will be updated for all network sites…  well, at least the files… on first visit to admin in network sites, any db upgrades will occur…

actually, might be a fair point on network upgrades…  some things in db may have issues until the admin is visited… gonna have to think on this some more… network upgrades are a nightmare – and will be more so if something needed in plugins…

BD Bruce Dienes
Bruce Dienes
Member

Thanks so much for your help. I manually uploaded and unzipped each plugin file and things seem to be back to normal now…

It does look like WP 4.0 messes up the auto-updates for SP and plugins, though… Have others reported this?

MP Mr Papa
Mr Papa
Member

No, we have had many thousands of upgrades via wp updates of core, plugins and themes since the release of 4.0…  doesnt mean there isnt a something locally going on for you, but it is generally working…

does the wp update page fully load?  just no sp plugins listed?  this is on the main site wp updates panel – not any of the network sites…

BD Bruce Dienes
Bruce Dienes
Member

Still have not recovered fully from the 5.5.1. upgrade into WP 4.0 Multisite (folders not subdomains)

When I go to Network Admin/Updates, there are no options to update Simple Press, even when the subsite knows it needs updating. When I click on the update link, it just takes me to the Network Admin/Updates page and there is nothing there to update…

I have manually upgraded to 5.5.2, and upgraded all the plugins and themes, but still quirky behaviour on some subsites, e.g.

  • All except one subsite will not display the glyphs in the forum editor, although they display in the WP blog.
  • One subsite that will display the list of forums, but clicking on any forum gives a 404, even though the forum permalink is OK. I can display the forum by setting “do not display group if there is only one forum”, but if I click on the actual link to the forum, I still get a 404. I tried renaming the forum slug, but it made no difference.

Key question: I’m wondering if I can uninstall SP from one subsite without uninstalling it from the entire site. I got nervous as it said it would delete the entire database if I uninstalled it. Note that this is a folder-based multisite, not a subdomain based one. Does that make a big difference? I want to try uninstalling, then reinstalling the forum, but there is one subsite with heavy usage that is for some reason working fine, and I don’t want to delete that! (Many of the other subsites have not started using it yet, so a reinstall is possible without loss of data there.)

If that is not a viable approach, do you have other suggestions?

Cheers,

Bruce

IK Ike
Ike
Member

Hey Bruce,

Unfortunately I have absolutely no experience with multisite and I don’t think Yellow Swordfish has had much luck with ms in the past, so will probably have to wait until Mr Papa is around I’m afraid.

MP Mr Papa
Mr Papa
Member

you previously asked this in another topic where I answered it (https://simple-press.com/support-forum/sp5-general-topics/user-and-sp-update-problems-ongoing-since-wp-4-0-update/#p146702)…

each install is standalone, so you should be able to uninstall each one independently…

of course, I would play it safe and make a db backup before hand…  I would also not select the option to remove any files too…