Support Forum

Error w/ topics not showing

MF Michael Ferris
Michael Ferris
Member

I am having two problems that I’m thinking may be related.

1) When I upgraded to V5, I lost my data. So I had to rebuild certain tables from a back-up. Certain tables were still in tact correctly. But some of the information in the tables isnt showing correctly on the website itself. The tables show content, and even the forum footer shows a topics and posts count. But the forum reports no topics in this forum.

2) When I try to add a new topic, I receive this error

Fatal error: Call to undefined function sf_pop_topic_page() in /problem-with-post-edit-buttonome/delreia/public_html/wp-content/themes/DELREIA_2.bkp/templates/post_title.php on line 61

The forum appears on http://delreia.com/forum/open-forum/

43 Answers

New Answer

MF Michael Ferris
Michael Ferris
Member

I restored my sfoptions tables and my forums disappeared again.

And then I received this error:

Please copy the details below and include them on any support forum question you may have:

6624 – success

6637 – success

6650 – success

6663 – success

6689 – success

Warning: Invalid argument supplied for foreach() in /problem-with-post-edit-buttonome/delreia/public_html/wp-content/plugins/simple-press/admin/library/spa-support.php on line 466

Warning: Invalid argument supplied for foreach() in /problem-with-post-edit-buttonome/delreia/public_html/wp-content/plugins/simple-press/admin/library/spa-support.php on line 466

Warning: Invalid argument supplied for foreach() in /problem-with-post-edit-buttonome/delreia/public_html/wp-content/plugins/simple-press/admin/library/spa-support.php on line 466

Warning: Invalid argument supplied for foreach() in /problem-with-post-edit-buttonome/delreia/public_html/wp-content/plugins/simple-press/admin/library/spa-support.php on line 466

Warning: Invalid argument supplied for foreach() in /problem-with-post-edit-buttonome/delreia/public_html/wp-content/plugins/simple-press/admin/library/spa-support.php on line 466

Warning: Invalid argument supplied for foreach() in /problem-with-post-edit-buttonome/delreia/public_html/wp-content/plugins/simple-press/admin/library/spa-support.php on line 466

6702 – success

MF Michael Ferris
Michael Ferris
Member

Please help.

After I restored the sfoptions tables, I realized it was from V4.3.5. So it caused some problems. Somehow it cant find the template to display the theme. I am getting this error message:

The current theme stylesheet:

/problem-with-post-edit-buttonome/delreia/public_html/wp-content///styles/

cannot be found. Please correct or select a new theme for proper operation.

YS Yellow Swordfish
Yellow Swordfish
Member

I am not really sure where you are up to on this. Can you go back to the beginning for me. What version were you on before you started the upgrade process? I know I just suggested in the other thread that you do need to restore all of the forum tables?

An 4.3.5 sfoptions table on a V5 system just is never going to work.

MF Michael Ferris
Michael Ferris
Member

A 4.3.5 table into a V5 system – Yes, I see that isnt going to work.

In the beginning –

When I took over as web admin, we had V4.3.5 activated and running successfully. We also had V5 sitting in our plugins list unactivated (was there ever an attempt to activate V5 before I became web admin, I don’t know).

I created a database back-up.

Then I upgraded to V4.5.1 then V5 as per instructions.

The V5 plugin installed correctly, but the legacy groups and forums didnt exist. The posts and topics did not move over either. But all my users were still intact and avail in the user settings.

So I researched how to rebuild database tables and rebuilt all the sf tables (most except the sfoptions). I didnt touch the members table, b/c it was mostly current.

The groups and forums moved over correctly. And the forum counted the topics and posts in the footer, but didnt show them in the forum.

Then I unfortunately decided to rebuild the sfoptions tables thinking it would solve the problem (yes, it was from the V4.3.5 back-up).

I went to my website to look at the forum, and it told me to upgrade the forum. So I did that, thinking it was just confused.

And thus, all the error messages I’ve posted recently.

Helpful?

I do appreciate all your help.

YS Yellow Swordfish
Yellow Swordfish
Member

Well the source of the problem, of course, is why were the tables empty. I can assure you first that simply deactivating SP does nothing other than inform WP that SP should no longer be loaded. This is something it would be useful to get to the bottom of even though it has no part in getting you back up and working.

So – thanks you your explanation above we can now trace the events and see what has gone awry. The problem comes from the old sfoptions table. Unfortunately there are two entries in the sfoptions table that store both the current build and the version of the currently installed SP. By restoring a previous versions sfoptions data SP checks the stored values against the values stored in the code and swings into upgrade mode.

The problem here, of course, is that the other tables have already been upgraded and there are quite a few db changes between V4.5 and V5. I can see that such a scenario would quite probably result in chaos with items not being where they are expected to be.

The decision to make is – is it salvageable or would it be more prudent to actually go back to V4 and start over again. That decision might hinge on whether there was a database backup made at the V4.5 interim stage and I suspect there was not or you would have used that sfoptions table instead.

It probably is salvageable but I suspect it will take quite a lot of manual tweaking to get things right and could end up being quite a painful and difficult process. To be honest – it is my opinion that going back to the beginning would be the simplest, quickest and safest policy.

MF Michael Ferris
Michael Ferris
Member

Correct, unfortunately there was no back-up done during the brief time I was running V4.5. But would it be useful anyway as would I be running into the same problem of trying to use V4.5 sfoptions data into V5 system’s tables?

Either way, I agree that starting over from V4 would be more prudent.

Would I go from V5 to V4.5 to V4.3.5?

Where would I find instructions / files for that?

Normally, you do not provide support for downgrading, but would you be able to provide support in this case?

As to finding out if the previous web admin[s] accidentally or purposefully caused data tables to be erased, we have disassociated ourselves from them and and changed all pertinent passwords.

YS Yellow Swordfish
Yellow Swordfish
Member

First job is to deactivate V5 SP.

Get a copy of 4.5.1. If you don’t have that then you can download it here: https://simple-press.com/download-manager.php?id=401. Install in the normal way. Note that the folder it creates in your WP plugins folder is the old ‘simple-forum’ name.

restore the database (all ‘sf’ tables) to their 4.3.5 backup.

Activate the newly installed 4.5.1 and run the upgrade from the admin.

Deactivate 4.5.1 and reactivate V5. Run the upgrade from the admin.

If you want to make a backup of the database after upgrading to 4.5.1 and before going to V5 then it is probably a good idea!

MF Michael Ferris
Michael Ferris
Member

Sounds good. But I want to clarify some steps.

I’m going to rewrite your instructions and anything I have a question on, I will put a question mark afterwards. If you could give me a yes/no to those, that would be appreciated. And correct anything else you see as incorrect and / or out-of-order.

1 – Deactivate V5

2 – Delete V5 folders?

3 – Download V4.5.1

4 – Install V4.5.1 via FTP?

5 – Restore ALL sf tables from the V4.3.5 back-up?

6 – Activate the V4.5.1

7 – Upgrade the V4.5.1 from admin

8 – Should the forum be functioning correctly at this point?

9 – Create a database back-up while on V4.5.1

10 – Download V5

11 – Install V5 via WP?

12 – Deactivate the V4.5.1?

13 – Delete the V4.5.1 folders?

14 – Activate V5

15 – Upgrade V5 from admin

YS Yellow Swordfish
Yellow Swordfish
Member

Michael Ferris said
Sounds good. But I want to clarify some steps.

I’m going to rewrite your instructions and anything I have a question on, I will put a question mark afterwards. If you could give me a yes/no to those, that would be appreciated. And correct anything else you see as incorrect and / or out-of-order.

1 – Deactivate V5

2 – Delete V5 folders?

That’s a good question and really has two answers! The simple-press plugin itself should be safe to just leave as long as it is deactivated. If, as I suspect it did, it created the ‘sp-resources’ folder under ‘wp-content’ then it is probably worth leaving that in place – I have performed many test upgrades from V4 to V5 with those folders left in place with no apparent issues resulting. I think that should be safe.

3 – Download V4.5.1

4 – Install V4.5.1 via FTP?

Yes – that is the only way.

5 – Restore ALL sf tables from the V4.3.5 back-up?

Yes. I would add a step before you do this. I would remove all current ‘sf’ tables from your working database before you restore the older ones. The reason for this suggestion is that V5 does create some new ones and it would be better to have those recreated at step 15 below.

6 – Activate the V4.5.1

7 – Upgrade the V4.5.1 from admin

8 – Should the forum be functioning correctly at this point?

Yes it should. Version 4.5.1 should work OK with the latest version of WordPress. So fingers crossed that it does!

9 – Create a database back-up while on V4.5.1

10 – Download V5

if you did not remove it at step 2 then you will still have it in your WP plugins folder…

11 – Install V5 via WP?

if you DID remove it in step 2 then I would still use ftp at this stage.

12 – Deactivate the V4.5.1?

Yes

13 – Delete the V4.5.1 folders?

Again it should be safe to leave until you have finished as long as it is deactivated. As a general rule, of course, it is always good policy to remove any plugin not in use.

14 – Activate V5

15 – Upgrade V5 from admin

Oh gosh – I hope this goes well!exclaim

MF Michael Ferris
Michael Ferris
Member

Yes, I have a sp-resources folder in wp-content, so best practice would be to not delete the V5 folders.

So, lets rewrite our instructions.

1 – Deactivate V5

2 – Download V4.5.1

3 – Install V4.5.1 via FTP

4 – Remove all sf tables from database? Not sure how to actually remove a table[s].

5 – Restore all sf tables from V4.3.5 back-up? see question for step 6

6 – Activate the V4.5.1? Will this recreate all the necessary sf tables? Should I do this before I restore from the back-up so all the appropriate tables will have been recreated and I can just repopulate them?

7 – Upgrade the V4.5.1 from admin

8 – Create a database back-up while on V4.5.1

9 – Deactivate the V4.5.1

10 – Activate V5

11 – Upgrade V5 from admin

12 – Delete all V4.5.1 folders

YS Yellow Swordfish
Yellow Swordfish
Member

That’s what I would be doing…

Ok – about questions 4-5-6. There is always something one does without thinking and then does not remember that other people may not do the same! So this depends upon the backup db script.

A good backup script will work through each table one at a time. It will (1) Delete the existing table (DROP TABLE) – (2) Create a new version of table (CREATE TABLE) and then insert all of the data.

You need to check yours. You can look at it with a text editor (PLAIN text editor not a word processor).

IF it performs a DROP TABLE then a CREATE TABLE and then lots of INSERT statements – perform step 4 as planned.
IF it performs CREATE TABLE and INSERT statements only – perform step 4 as planned.
IF it ONLY has INSERT statements (which is most unlikely) then come back to me and we will talk that bit through.

If one of the first two then stick to the order above.

MF Michael Ferris
Michael Ferris
Member

Heres the beginning of my sfposts table from the back-up:

# ——————————————————–
# Table: `wp_sfposts`
# ——————————————————–

#
# Delete any existing table `wp_sfposts`
#

DROP TABLE IF EXISTS `wp_sfposts`;

#
# Table structure of table `wp_sfposts`
#

CREATE TABLE `wp_sfposts` (

So it does DROP the table, then reCREATEs the table and INSERTs the data (code not shown).

But when you said

I would remove all current ‘sf’ tables from your working database before you restore the older ones. The reason for this suggestion is that V5 does create some new ones and it would be better to have those recreated at step 15 below.

Is it possible to do that w/o using the backup? B/c the backup code will instantly recreate the tables.

When I did the restore the other day, I just copied and pasted each table from NP++ into phpMyAdmin via the SQL tab. Is there another more efficient method that would remove all current sf tables?

YS Yellow Swordfish
Yellow Swordfish
Member

REMOVE OLD TABLES: Yes actually – that’s a good question. In the WP plugins list against SP if you click on the Uninstall option instead of deactivate it will remove all of the old data – just follow the prompt.

RESTORING OLD TABLES: IF your sql restore script ONLY contains the forum ‘sf’ tables then the quickest and easiest way is to import it. When you view the list of database tables in phpMyAdmin, Import will be available on the top menu.

of course of the script contains all of the wp tables as well then you mustn’t do this. But it would still be quicker to edit the script to remove the wp tables and just leave all of the forum tables for import than doing it one at a time,.

MF Michael Ferris
Michael Ferris
Member

ok, back to 4-5-6

5 – my back-up does contain all my wp tables. but editing out the wp tables, saving it as a different file w/ only the sf tables, and then importing the sf tables file sounds easy enough

4 – i just installed V4.5.1 via FTP. I now have both V5.1.3 and V4.5.1 in my WP plugins lists, neither activated. How and what am I supposed to uninstall?

6 – this step makes sense, but will it overwrite the sf tables i just restored?