Support Forum

Plupload – image upload not working – database corrupted?

AM Ari Matikka
Ari Matikka
Member

Plupload stopped working. Images cannot be uploaded no more.

After this, I deactivated and deleted the plugin and downloaded version 4.0 from WordPress, which procedure apparently emptied all image folders. So, all images are gone. Luckily, the forum is still in a test phase, so nothing valuable has not been lost.

From the error log:

Syyskuu = September

syyskuu 27, 2014 15:26 | spaErrError | 3 | database

file: /problem-with-post-edit-buttonome/suomenor/public_html/wp-content/sp-resources/forum-plugins/plupload/sp-plupload-plugin.php

line: 198

function: sp_plupload_do_forumview_query

error: Table ‘suomenor_wp52.qbi_sfpostattachments’ doesn’t exist

SELECT topic_id FROM qbi_sfpostattachments WHERE topic_id IN (2)

syyskuu 27, 2014 15:26 | spaErrError | 9 | database

file: /problem-with-post-edit-buttonome/suomenor/public_html/wp-content/sp-resources/forum-plugins/plupload/library/sp-plupload-components.php

line: 888

function: spdb_table

error: Table ‘suomenor_wp52.qbi_sfpostattachments’ doesn’t exist

SELECT * FROM qbi_sfpostattachments WHERE post_id IN (29,28,27,26,25,24,23,21,20,19,18,17,16,15,14,13,12,11,10,9)

syyskuu 26, 2014 10:38 | spaErrWarning | 8 | php

file: omenor/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php

line: 32

function: include_once

Warning | Invalid argument supplied for foreach()

syyskuu 26, 2014 10:38 | spaErrWarning | 8 | php

file: omenor/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php

line: 28

function: scandir

Warning | scandir(/problem-with-post-edit-buttonome/suomenor/public_html/wp-content/sp-resources/forum-media-uploads/admin/) [function.scandir]: failed to open dir: No such file or directory

 

Before Sept. 26.2014 10:38, I installed two plugins: private-messaging and font resize.

Sept. 27.2014 15:26 errors are related to Plplugin re-installation. 

Please, your suggestions, what shall I do?

15 Answers

New Answer

MP Mr Papa
Mr Papa
Member

wp 4.0 emptied your image folders??  it wouldnt even know about our image folders… 

what version of sp?  you are missing a key table in the db based on the image… as if a recent sp upgrade script did not run…

AM Ari Matikka
Ari Matikka
Member

Sorry, I try to be more precise:

So, the Plupload stopped working. “Start upload” button is numb.

Here the error shows up for the first time in the php_errorlog. Probably by coincidence, this happens the same minute I changed the UTC time in WordPress to local time.:

[26-Sep-2014 07:37:12 UTC] PHP Warning: Missing argument 2 for sp_setup_browser_title() in /problem-with-post-edit-buttonome/suomenor/public_html/wp-content/plugins/simple-press/sp-startup/forum/sp-forum-support-functions.php on line 552

[26-Sep-2014 10:37:52 Europe/Helsinki] PHP Warning – scandir(/problem-with-post-edit-buttonome/suomenor/public_html/wp-content/sp-resources/forum-media-uploads/admin/) [<a href=’function.scandir’>function.scandir</a>]: failed to open dir: No such file or directory – file: omenor/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php – line: 28 – function: scandir

[26-Sep-2014 10:37:52 Europe/Helsinki] PHP Warning: scandir(/problem-with-post-edit-buttonome/suomenor/public_html/wp-content/sp-resources/forum-media-uploads/admin/) [<a href=’function.scandir’>function.scandir</a>]: failed to open dir: No such file or directory in /problem-with-post-edit-buttonome/suomenor/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php on line 28

[26-Sep-2014 10:37:52 Europe/Helsinki] PHP Warning – scandir() [<a href=’function.scandir’>function.scandir</a>]: (errno 0): Success – file: omenor/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php – line: 28 – function: scandir

Obs. above: …file: [su]omenor/public_html/wp-content…          Is su lost?

The attempt to fix the error by renewing the Plupload installation was tried one day later. I deactivated and deleted the Plupload plugin and downloaded the newest version 4.0 of Plupload  through WordPress (also 4.0), which procedure then emptied all forum image folders (the WordPress image files are intact).

The Simple:Press version is 5.5.1.

(Moreover: The above warning message “missing argument 2 for sp_setup…” is filling my php_errorlog)

MP Mr Papa
Mr Papa
Member

for the browser title, what are  you using for separator on forum – components – seo?

there is nothing in a plupload upgrade that would remove any files or directories…  check the code yourself…  is the directory there and empty? or just not there?  check /problem-with-post-edit-buttonome/suomenor/public_html/wp-content/sp-resources/forum-media-uploads and /problem-with-post-edit-buttonome/suomenor/public_html/wp-content/sp-resources/forum-media-uploads/admin (which btw is poor security to have an account called admin – easier for hack attempts)…  there is no code that would empty the /admin (or other user dir)…  on uninstall of plupload (or simple pres), the entire image, media and files dirs would be deleted…

AM Ari Matikka
Ari Matikka
Member

Well, the images were in place just  before the plugin upgrade and gone just after it. The directories you named, are empty. However, as I wrote, this is not a big concern .

Something went wrong already before the upgrade. 

Now, a user gets an unspecified database error message every time he/she browses the forum. Maybe it is best that I delete the whole forum and make a fresh start?  I’m a bit worried though what happens next,  if the database really is corrupted. 

 

Separator on the forum, sorry I don’t understand the question. 

MP Mr Papa
Mr Papa
Member

I was asking what your page title separator is… the error is because its undefined… I referenced the admin panel for you to check…  forum – components – seo

MP Mr Papa
Mr Papa
Member

actually, it looks like something is firing the wp_title hook but not passing enough arguments…  can you check your wp theme or other plugins and see if any of them fire the wp hook?  wp sends enough args… simple press just uses them…

AM Ari Matikka
Ari Matikka
Member

I have not touched the separator – what ever it is used for. Checked and it is |.  What should it be? 

There are hundreds of warning messages  in the error log from this separator issue, so this hardly is the reason for the Upload problems. 

AM Ari Matikka
Ari Matikka
Member

Mr Papa said
actually, it looks like something is firing the wp_title hook but not passing enough arguments…  can you check your wp theme or other plugins and see if any of them fire the wp hook?  wp sends enough args… simple press just uses them…

Sorry, this is beyond my skills. I could mail you the login info, if you’d like to see yourself. 

MP Mr Papa
Mr Papa
Member

no, it has nothing to do with uploads… as I said, something is firing the wp filter and not passing enough arguments…  a login really wont help as to search themes and plugins really need to be on the server, not the wp admin…

To get around whatever is firing the hook wrong, you could edit that line of code, line 552 in sp-forum-site-support-functions.php and replace this line

function sp_setup_browser_title($title, $sep, $seplocation=”) {

with

function sp_setup_browser_title($title, $sep=’|’, $seplocation=”) {

that way it handles whatever is incorrectly calling it…  might even think about that as a permanent change to the code base to handle misbehaving themes/plugins…

AM Ari Matikka
Ari Matikka
Member

Made the change. First I got:

Parse error: syntax error, unexpected ‘|’, expecting ‘)’ in /problem-with-post-edit-buttonome/suomenor/public_html/wp-content/plugins/simple-press/sp-startup/forum/sp-forum-support-functions.php on line 552

Then changed the code back and tried again with ‘|’. This time it went through. No more missing argument errors.

But, still cannot upload images:

tietokannan virhe = database error

[29-Sep-2014 09:45:32 Europe/Helsinki] WordPress-tietokannan virhe Table ‘suomenor_wp52.qbi_sfpostattachments’ doesn’t exist kyselylle SELECT topic_id FROM qbi_sfpostattachments WHERE topic_id IN (2) Tekijä: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/Divi/page.php’), the_content, apply_filters(‘the_content’), call_user_func_array, sp_render_forum, sp_process_template, sp_load_template, include(‘/sp-resources/forum-themes/default/templates/spForumView.php’), sp_this_forum, spForumView->__construct, spForumView->sp_forumview_query, apply_filters(‘sph_forumview_combined_data’), call_user_func_array, sp_plupload_forumview_query, sp_plupload_do_forumview_query, spdb_select

[29-Sep-2014 09:45:42 Europe/Helsinki] WordPress-tietokannan virhe Table ‘suomenor_wp52.qbi_sfpostattachments’ doesn’t exist kyselylle SELECT * FROM qbi_sfpostattachments WHERE post_id IN (10,9,6,5,4) Tekijä: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/Divi/page.php’), the_content, apply_filters(‘the_content’), call_user_func_array, sp_render_forum, sp_process_template, sp_load_template, include(‘/sp-resources/forum-themes/default/templates/spTopicView.php’), sp_this_topic, spTopicView->__construct, spTopicView->sp_topicview_query, apply_filters(‘sph_topicview_combined_data’), call_user_func_array, sp_plupload_post_records, sp_plupload_do_post_records, spdb_table, spdb_select

AM Ari Matikka
Ari Matikka
Member

Made the change. No more  “missing argument 2 for sp_setup…” errors.

However, I still couldn’t upload images and the database error existed (because of the missing images?)

Deleted all forums and made a new one. 

Plupload still not working. “Start upload” button does not respond.

IK Ike
Ike
Member

This is by the look of it outside my knowledge, so unfortunately we will probably have to wait for Steve to take a look, but if everything is right with the forum and the Plupload button is still not working, going back to basics are you getting any JS conflicts on the page?

MP Mr Papa
Mr Papa
Member

as I mentioned, fixing your other plugin/theme issue for the error will have no impact on the file uploading…

if the button is non responsive, its going to come down to js conflict…  do you have link to site so we can check for obvious error?

is this sp 5.5.1?  the db error seem to indicate you are missing a key db table…  do you see a wp_sfpostattachments table in your db?  your wp db prefix might be other than wp_

AM Ari Matikka
Ari Matikka
Member

Progress made, I found a plugin that conflicts with Plupload. After removing  it, the image upload works!

However, I still keep getting those “Invalid database inquiry” messages every time I read a forum topic.

No, I do not see any wp_sfpostattachments table, but qbi_sfposts contains the newly uploaded image files

This is 5.5.1

Here is the link: http://ams21.siteground.eu/~suomenor/forum-2/  – site not published yet

The login details are in a PM for Papa

Thank you for your patience with this!

Edit: 

php_errorlog shows:

[30-Sep-2014 20:34:05 Europe/Helsinki] WordPress-tietokannan virhe Table ‘suomenor_wp52.qbi_sfpostattachments’ doesn’t exist kyselylle SELECT topic_id FROM qbi_sfpostattachments WHERE …