Support Forum

Warning: in_array() expects parameter 2 to be array,

PB Paul Browning
Paul Browning
Member

Upgraded to WordPress 4.0 and now every forum post has this at the top:

 

Warning: in_array() expects parameter 2 to be array, string given in /problem-with-post-edit-buttonome/problem-with-post-edit-buttonowtonet/public_html/wp-includes/formatting.php on line 324

 

www.howtonetwork.com

15 Answers

New Answer

MP Mr Papa
Mr Papa
Member

that is a wp error but could be caused by plugin…  cant tell without more info…

so running Simple Press 5.5.1 and updated all SP plugins too?  your other wp plugins updated too?

PB Paul Browning
Paul Browning
Member

I didn’t see there was an upgrade. That fixed it but now as admin I can’t view any posts.

 

Access denied – you do not have permission to view this page

 

I upgraded the tables.

 

regards

 

Paul

PB Paul Browning
Paul Browning
Member

I’ve looked at the Forum plugins but can’t see how to upgrade. It says ‘ There is an update for the Achievements Integration plugin. Version 1.0.1 is available. For details and to download please visit Simple:Press or go to the WordPress updates page’ but when you go to the wordpress updates page none are listed.

 

Regards

 

Paul

YS Yellow Swordfish
Yellow Swordfish
Member

Let’s come back to updating and try and deal with the front end first.

Can you go to the forum admin > toolbox > housekeeping and run both the ‘Reset Auths Cache’ and the ‘Flush General Cache’ tasks and see if that resolves the access issue?

PB Paul Browning
Paul Browning
Member

Sorry, no luck.

 

Access denied – you do not have permission to view this page

 

I can try to upgrade the other plugins if you can let me know how.

 

regards

 

Paul

YS Yellow Swordfish
Yellow Swordfish
Member

OK – back to versions then!

What version of WordPress and Simple:Press are you now running. And is this just the one plugin (achievements) you can not update or is it many plugins?

PB Paul Browning
Paul Browning
Member

Hi,

Upgraded to the latest version of both just now and then the issue started.

One the upgrade page none of the plugins are listed for SimplePress. The other non-forum plugins are all there.

Regards

 

Paul

YS Yellow Swordfish
Yellow Swordfish
Member

So the next question is – why os WordPress not showing the plugins that need updating? Is there anything in the error log that might explain it?

PB Paul Browning
Paul Browning
Member

I have no clue, that’s what I’m trying to find out. What is the error log?

The forum posts now show ‘Invalid database query’ at the top and I’m still blocked from viewing.

Regards

 

Paul

YS Yellow Swordfish
Yellow Swordfish
Member

Well – of course we don’t know if the invalid database query is caused by mismatched version or something else.

Error Log: Under the Toolbox menu.

Open it – first clear it out using the button at the bottom. Try and open a forum page and then return to the log and let me know what it says. JUST errors at the moment please. Not warnings or notices!

PB Paul Browning
Paul Browning
Member

September 9, 2014 11:09 am | spaErrError | 1 | database


file: /problem-with-post-edit-buttonome/problem-with-post-edit-buttonowtonet/public_html/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, wp_sftopics.topic_id, wp_sftopics.forum_id, topic_name, topic_slug, topic_status, topic_pinned, topic_icon, topic_opened, wp_sftopics.post_count, forum_slug, forum_status, forum_disabled, forum_rss_private, wp_sfposts.post_id, post_date, wp_sfposts.user_id, guest_name, guest_email, post_status, post_pinned, post_index, post_edit, poster_ip, source, post_content, wp_sfwaiting.post_count AS new_post, blog_post_id, attachments, post_ratings, rating_id, vote_count, ratings_sum, ips, members, thanks, topic_watches FROM wp_sftopics JOIN wp_sfposts ON wp_sftopics.topic_id=wp_sfposts.topic_id JOIN wp_sfforums ON wp_sftopics.forum_id=wp_sfforums.forum_id LEFT JOIN wp_sfwaiting ON wp_sfposts.post_id=wp_sfwaiting.post_id LEFT JOIN wp_sfpostratings ON wp_sfpostratings.post_id = wp_sfposts.post_id WHERE wp_sftopics.topic_id=340 ORDER BY post_pinned DESC, wp_sfposts.post_id ASC LIMIT 0, 20

YS Yellow Swordfish
Yellow Swordfish
Member

This should be sorted by upgrading all components. Did the upgrade to 5.5.1 go smoothly and without incident? Are you 100% sure that you ARE on 5.5.1 ?

YS Yellow Swordfish
Yellow Swordfish
Member

https://simple-press.com/documentation/codex/plugins/plugin-basics/using-plugins/

That has a paragraph about adding new plugins to your Simple:Press plugins folder. You will probably need to do this to update them if, for reasons unknown, WordPress is not behaving and giving you the updates. Just overwrite the individual existing plugin folders with the new versions.

Or – one thing you could try quickly. Deactivate the Simple:Press file uploader plugin and see if (a) the forum then displays correctly and (b) if the upgrade list comes back.

PB Paul Browning
Paul Browning
Member

Yep – Version 5.5.1

All plugins now updated and it seems to have resolved the issue thanks.

regards

 

Paul