Support Forum
Sorry. Operator error on screenshots. Here they are.
BobChristensen
http://www.theformtool.com
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...
Visit Cruise Talk Central and Mr Papa's World
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
BobChristensen
http://www.theformtool.com
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...
Visit Cruise Talk Central and Mr Papa's World
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.
BobChristensen
http://www.theformtool.com
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...
Visit Cruise Talk Central and Mr Papa's World
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.
BobChristensen
http://www.theformtool.com
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?
YELLOW
SWORDFISH
|
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.
BobChristensen
http://www.theformtool.com
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
BobChristensen
http://www.theformtool.com
1 Guest(s)