Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Upgrade to 5.1.2 failed
Avatar
chucktho
Member
Free Members
sp_UserOfflineSmall Offline
Aug 1, 2012 - 2:30 pm

I attempted to upgrade to 5.1.2.  The upgrade was aborted by Simple Press and the details below were provided:

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 D:\dev.alarmsearch.com\wordpress\wp-content\plugins\simple-press\admin\library\spa-support.php on line 466

Warning: Invalid argument supplied for foreach() in D:\dev.alarmsearch.com\wordpress\wp-content\plugins\simple-press\admin\library\spa-support.php on line 466

Warning: Invalid argument supplied for foreach() in D:\dev.alarmsearch.com\wordpress\wp-content\plugins\simple-press\admin\library\spa-support.php on line 466

Warning: Invalid argument supplied for foreach() in D:\dev.alarmsearch.com\wordpress\wp-content\plugins\simple-press\admin\library\spa-support.php on line 466

Warning: Invalid argument supplied for foreach() in D:\dev.alarmsearch.com\wordpress\wp-content\plugins\simple-press\admin\library\spa-support.php on line 466

Warning: Invalid argument supplied for foreach() in D:\dev.alarmsearch.com\wordpress\wp-content\plugins\simple-press\admin\library\spa-support.php on line 466
6702 - success

This is a Wordpress Multisite running on a Windows server using IIS 6.

I have no idea where to begin trying to solve the problem.  Any help will be greatly appreciated.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 1, 2012 - 8:05 pm

what version did you upgrade from? 

IIS, hmmm wonder if thats part of the issue...   we had the problem couple versions ago but have resolved it - so we thought as we had multiple confirmations and no more happenings... but very few folks are stuck using IIS...

It appears you have lost all your permissions...

do you have a db backup from before the upgrade as recommended?  if so, would be interesting to try the upgrade again...

If not, you will need to go to Forum - permissions - reset permissions and rest your permissions to the default state... this will be easy if you do not customize any permissions...  if you made some changes, you will need to remake them... probably safest to deactivate your sp plugins too and then reactivate them to make sure they set up their permissions...

Avatar
chucktho
Member
Free Members
sp_UserOfflineSmall Offline
Aug 2, 2012 - 10:09 am

I should have said this at the beginning of the post - sorry.

 I tried the Automatic Upgrade option several times and in every case it took me to a page which said that I had the latest Wordpress version - nothing about SimplePress.  So I downloaded the newer SimplePress version and tried to install it.  Failed - "folder already exists".  Looked on the SimplePress site for some direction regarding upgrading and couldn't find anything.  DELETED the version I had and then tried to install the latest version and THAT IS WHEN I got the error messages included in the original post.

"what version did you upgrade from? "  I don't remember, but it was 5 something.

"do you have a db backup from before the upgrade as recommended?  if so, would be interesting to try the upgrade again…"  Yes, but I'm afraid it would cause more problems than it fixed.  It would take too long to go into it in detail, but a few weeks ago the hosting provider restored the site from his backup and totally hosed it.  Somehow his backup was incrementally adding files to the point that every plugin I've ever had and erased was back along with every version (13) of my theme files, etc.  Since he is also the client, I am STUCK using Windows.

"If not, you will need to go to Forum – permissions "  I am not offered that option - only "Upgrade SimplePress".

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 2, 2012 - 12:32 pm

The important thing we really need to know is what version you were on before. There are links to install and upgrade instructions (from both V4 and V5) on the page you downloaded the latest version from so I am not sure how you missed them.

but to try and understand where you are at we could do with the old version number you are trying to upgrade from. If you can get into the database then you could look at the sflog table which will tell you.

andy-signature.png
YELLOW
SWORDFISH
Avatar
chucktho
Member
Free Members
sp_UserOfflineSmall Offline
Aug 3, 2012 - 10:22 am

Here's what it says when I click the Upgrade button:

Upgrade Simple:Press From Version 4.5.1 to 5.1.2 - (Build 6401 to Build 8910)

Does that help?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 3, 2012 - 11:16 am

It does indeed.

So - when you continue ahead with the upgrade I assume it ends up with the mess you had at the first post - is that correct? I will continue as if that is the case...

My best guess is - and I am afraid it is a guest - is that you have an issue with the permissions data in your database. It is at that point that things are going awry.

If you are willing to accept the loss of your permission records then I can give you a small code change that can bypass that section and then afterwards we can fix the permissions back up - there is actually a tool in the manage Permissions admin panel to reset them back to the default.

The alternative is top try and sort out the data problem before you attempt the upgrade...

andy-signature.png
YELLOW
SWORDFISH
Avatar
chucktho
Member
Free Members
sp_UserOfflineSmall Offline
Aug 3, 2012 - 2:10 pm

I'm a complete neophyte and at a complete loss, so whichever way you think would be best is ok with me.  If I lose all the permissions, I guess I'll just figure it out if we can't get them back - I think there are only a couple dozen users.

Bear in mind that I am not a coder, so whatever it is you want me to change or add, please be very specific.

I really appreciate your help.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 3, 2012 - 8:43 pm

I am not sure what code change Andy was thinking of, so will have to wait til AM for him to come back...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 4, 2012 - 4:42 am

OK - before you try this let's include Steve (Mr Papa) who knows this code better than I - to check if he thinks this is the safest approach. So hold off until he posts as well.

Code file to change: /simple-press/sp-startup/install/sp-upgrade-support.php

Function to change starts on line 218 named: sp_convert_perms_to_auths()

Right at the bottom of the function is this segment of code:

# now we need to convert existing roles
$roles = spdb_table(SFROLES);
foreach ($roles as $role) {
    $actions = unserialize($role->role_actions);
    $new_actions = spa_convert_action_to_auth($actions);
    spdb_query("UPDATE ".SFROLES." SET role_actions='".serialize($new_actions)."' WHERE role_id=".$role->role_id);
}

which I am suggesting you change to:

# now we need to convert existing roles
$roles = spdb_table(SFROLES);
foreach ($roles as $role) {
    $actions = unserialize($role->role_actions);
    if( ! empty($actions)) {
        $new_actions = spa_convert_action_to_auth($actions);
        spdb_query("UPDATE ".SFROLES." SET role_actions='".serialize($new_actions)."' WHERE role_id=".$role->role_id);
    }
}

But as I say - let's wait for Steve's input before going ahead.

andy-signature.png
YELLOW
SWORDFISH
Avatar
chucktho
Member
Free Members
sp_UserOfflineSmall Offline
Aug 13, 2012 - 4:22 pm

Mr. Papa hasn't weighed in on this yet.  I think maybe it got lost in the pile.  Since you said to wait for him, I haven't tried your proposed solution yet.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17368
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626