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
Warnings on Admin pages
Avatar
Bob Christensen
Olympia, WA
Member
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2012 - 6:21 pm

Sorry. Operator error on screenshots. Here they are.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2012 - 6:25 pm

looks like I was fooled by the title and wording in here... it says admin pages... I cannot get them to show on admin, but can see the front end...

that said, still have no clue why they happening...  there is an explicit check for the condition but on your server its not catching it for some odd reason...

for now, to get rid of the message, edit line 122 where the error is occurring and change

        if (in_array($key, $memberRanks)) {

to

        if (is_array($memberRanks) && in_array($key, $memberRanks)) {

that will stop the error, but does not tell what the real underlying problem is...  and that is worrying for this unique report...

Avatar
Bob Christensen
Olympia, WA
Member
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2012 - 6:32 pm

When my crisis is over, I will very much join in your curiosity, because any sample of one is curious! In the meantime, my coder, who just had a baby has gone MIA and even your simple instructions are beyond my experience. Is what you ask done within SP? or does it require FTP? If FTP, can you tell me… how?

Sorry to be a bother...

 

Bob

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2012 - 7:28 pm

within Simple Press... so file wp-content/plugins/simple-press/sp-api/sp-api-common-display.php

find that line 122 and replace the one I said with my one change... will get rid of the error and should have no impact on operation...

Avatar
Bob Christensen
Olympia, WA
Member
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2012 - 7:48 pm

Putting that replacement language in results in this failure

 

Parse error: syntax error, unexpected ';' in /problem-with-post-edit-buttonome/content/07/8498207/problem-with-post-edit-buttontml/wp-content/plugins/simple-press/sp-api/sp-api-common-display.php on line 245

 

Which seems to have taken the entire site down.frown

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2012 - 9:26 pm

please check your code against mine... you changed one line of code around line 122...  how did you get an error at 245?  are you sure you only made the one change?

the code you changed is in one routine which goes from 113 - 131...  so again, not sure how something broker at 245... you might paste that whole sp_get_user_special_ranks() routine you changed...

Avatar
Bob Christensen
Olympia, WA
Member
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2012 - 10:57 pm

Here's a shot of the code. I had presumed that the difference in line numbers was just the way Text Wrangler pulled it off, at two lines per real line (122 x 2 = 244).

I pulled the line that you can see slightly highlighted:         if (in_array($key, $memberRanks)) {
and replaced it, cut and paste, with the line you supplied.

In Text Wrangler, line 122 looks like the second screen shot, included.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 30, 2012 - 5:08 am

well the line of code you have highlighted in the first shot is indeed the correct one to change. I can also conform that Steve's code change above is correct and safe to use so I have to assume a typing error of some kind when you made the edit.

This is the line of code to change it to - perhaps you could use the raw code button to allow you to copy and paste it:

if (is_array($memberRanks) && in_array($key, $memberRanks)) {

This, of course, only hides the error condition and Steve is quite correct that the error condition makes no logical sense.

I do have one question however. When we asked, early in this thread, for you to expose some data on the screen one of the items returned gave a value of NULL. It has taken me a while I am afraid - but that particular item of data should never return a NULL. Can you tell me what versions of MySQL and PHP you are using there please?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Bob Christensen
Olympia, WA
Member
Free Members
sp_UserOfflineSmall Offline
Jul 30, 2012 - 8:40 am

Thanks for the follow up:

We're using MySql 5.0 and PHP 5.2, with 5.3 available if we want it, all at GoDaddy.

For the coding change, it was a straightforward cut and paste, being careful as I recognized that I'm not expert at this. I can try it again if we want, but given the last result would like to wait until this trip is completed and I'm on the ground for awhile, which will be late this PM Pacific Time, just in case we get the same result or other unexpected outcome.

-- Bob

 

PS -- Got it!  I copied your insertion code from the email notification of your posting. The email system edited your code, it's substantially different from the raw code in your most recent message. Given that, I'm going to attempt another replacement now.

Avatar
Bob Christensen
Olympia, WA
Member
Free Members
sp_UserOfflineSmall Offline
Jul 30, 2012 - 9:04 am

Progress. The site stayed up (Thank you!!!). I've gone through many of the pages which were troublesome before and many are cleared of the warnings.

The problem pages that remain all seem to be Forum pages, where there are (new, different) warnings in just one part of the page. I've included screen shots. I hope that the difference in warnings gives you another clue as to what is happening.

Thanks for the progress!

 

-- Bob

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: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626