PHP Warning line 552 in sp-api-class-spcdb.php
-
I was warned that I was using PHP7.3 and should go to 7.4.
I got message after going to 7.4 messing up my pages.
back to 7.3.
Theme used HULK latest version.
-
Hello:
Can you please post the entire warning message you received?
Also, does the message show up if you use the basic WordPress 2020 theme?
When you turned on php 7.4, did you flush your caches?
Thanks.
Herewith. I am not using any cashing plugin in WP I am aware of. Cleared the browser cache. Then message appears quickly and is replaced by site contents. Pages shift into different positions. After logging out message appears on lg out page.
Warning: Creating default object from empty value in /home/zweefnl/domains/leden.zweef.nl/public_html/wp-content/plugins/simplepress/sp-api/sp-api-class-spcdb.php on line 552
Line 552 contents: SP()->rewrites->pageData[‘queryrows’] = 0;
Regards, Jacob.
Hi:
Warning messages shouldn’t appear on the screen like that unless they’re specifically configured to do that. Take a look in your wp-config.php file – look for a line line this:
define( ‘WP_DEBUG_DISPLAY’, true );
Replace the ‘true’ in there with ‘false’. That will prevent the messages from showing up on the screen and distorting the display.
Hello,
Checked the setting which reads: define(‘WP_DEBUG’, false)
Regards, JacobHi:
The only way for warnings to show up on the front-end of the site is if both WP_DEBUG and WP_DEBUG_DISPLAY are set to true.
Can you please double-check to make sure that both are set to false and that the file you’re looking at is the file that WP is using?
Something is setting both of those values to true otherwise warning messages would not be appearing on the display – they would only appear in the log files.
Thanks.
Also, can you post a screen shot of what you’re seeing? Thanks.
Hi again,
I added the DEBUG_DISPLAY statement to wp-config.php although I tend to believe that the: define(‘WP_DEBUG’ false); statement implies DISPLAY to be false as well.
Changed back to PHP7.4 again. Blog started OK but when going to a different page an amount of black space appeared above it. Then when logging out – log in to the blog is mandatory! – I receive a white screen with subject message. The displayed URL looks following: https://leden.zweef.nl/?leden&action=logout&redirect_to=https%3A%2F%2Fleden.zweef.nl%2F&_wpnonce=aa6f32d015
Using PHP7.3 the URL on logout reads: https://leden.zweef.nl/?leden&redirect_to=/?page_id=188
Page_id=188 is our front page. Since this page is marked as “Members only” (we are a gliding club) the WP login page is displayed then.
Regards, JacobHi:
Yes, define(‘WP_DEBUG’ false); does imply DISPLAY as false as well. But since your WordPress installation did not seem to be respecting the FALSE setting for some reason it seemed better to have both of them in there just to be sure.
Unfortunately I’m unable to read the screen shots. The first one is not in English and the second link seems to take me to a login page.
Are you still receiving the Simple:Press warning message? If so, can you please post an image of the message? Hopefully with that we can tell if it’s WP that is showing the message on the front-end or if maybe another tool is capturing the message and displaying it. With the WP_DEBUG_DISPLAY set to false, you should not be seeing any PHP warning messages on your screen.
Thanks.
Hi,
ran several tests. first login after going to 7.4 is ok. after logout site cannot be reached anymore. page tag reads WordPress Error. in one instance got 2 msgs:Warning: Creating default object from empty value in /home/zweefnl/domains/leden.zweef.nl/public_html/wp-content/plugins/simplepress/sp-api/sp-api-class-spcdb.php on line 552
Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in /home/zweefnl/domains/leden.zweef.nl/public_html/wp-content/plugins/widget-entries/iinclude_page.php on line 307
Can setup site for you in 7.4 and give you member credentials for a login, logout and a 2nd login to see result online but need a definite timeslot then.
also I could setup my localhost which I use for testing (XAMPP) but I am not sure if I can manage to make PHP7.4 active in XAMPP.
Regards. Jacob.
Hi:
Unfortunately we cannot do hands-on troubleshooting in this forum on free plugins. We’re happy to try to help but without licensing and legal disclaimers in place we cannot take the responsibility that comes with accessing customer systems (among other things).
I’m still not sure what’s happening now – are you still receiving the warning messages on the screen? If so can you please post screen shots.
Also, the second warning message about “break” is not a simple-press message.
Also, it looks like you’re doing all your testing with other plugins and themes enabled. To simplify things you should disable those so that you can be sure there are no conflicts and all messages are from simple-press. Once the messages are no longer displaying on the screen you can re-enable them. If you still have your debug flags set to false it is possible that one of the other plugins are forcing the messages to the screen anyway (a screen shot would help so we can see if it’s a standard WP output or a formatted output from a plugin/theme).
Thanks.
Hi again.
I have started a clean XAMPP 7.4.7 localhost (after having backed up my WP website and DB).
Restored WP and DB. Logged in to WP. Subject message appeared.G:\xampp\htdocs\wordpress\wp-content\plugins\simplepress\sp-api\sp-api-class-spcdb.php on line 552
Deactivated all Plugins. Logged out and back in: Clear of message.
Upon activating Simple:Press plugin (ONLY THIS ONE) message appeared directly.
Theme used is HULK. Changed theme to WP 20/20. Same result.
SP Plugin is 6.5.1
On deactivation I receive msgWarning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in G:\xampp\htdocs\wordpress\wp-content\plugins\widget-entries\iinclude_page.php on line 307
On activation SP plugin I receive a warning that the plugin generates 187 errors “Unexpected output” during activation – msg unfortunately in Dutch:
De plugin heeft 187 fouten gegenereerd Onverwachte uitvoer tijdens activatie. Als je “headers al verzonden” berichten opmerkt, problemen met syndication feeds of andere problemen ervaart, probeer dan deze plugin te deactiveren of te verwijderen.
What can I do more?
Regards, JacobHi:
hmmm….I’m not sure what backing up and restoring the same site was supposed to do? It’s still the same site with the same files and same plugins and themes active so I wouldn’t expect anything different.
As mentioned in the last message, widget-entries is not one of our plugins and the unexpected output message is not going to be from the simple-press plugin either.
If your debug flags are off but you’re still seeing the warning messages on the front-end screen then something else is forcing them out there. They should not be shown at all anywhere with the debug flags turned off.
Is there a reason you’re not providing the screen shots we asked for in the prior messages?
If you’d like to continue to troubleshoot this, you’ll need to turn off all other plugins, switch your WordPress theme to the basic WordPress 2020 theme and turn off the debug flags in wp-config. That should resolve the issue from the simple-press plugin itself. Then you can start to turn on the other plugins one by one to see which one causes the issues to appear again. At that point you can troubleshoot to see if the issue is from that other plugin or if it’s an issue with a conflict between the two plugins. It could also be an issue or conflict with the theme as well – the same process should help identify that too.
Thanks.
Hi
– on localhost
– changed theme to basic WP2020 – WP_DEBUG and WP_DEBUG_DISPLAY both false
– inactivated ALL plugins – logged out – logged in Please note: WP Site diagnosis shows nothing but warnings to remove inactive plugins and themes! Now:
– activated Simple:Press plugin – warning message appears on top and the message, (see previous post) abt 187 errors being generated in a box on top of WP screen.
Running site diagnosis again now showing Critical problem: A plugin inhibits updates by switching off wp_version_check() Please note ONLY S:P plugin is activated.
I could reinstall English version of WP for English screen shots (how do I transfer these to you?)
Regards. Jacob.Hi – you can post the screen shots of the errors in this forum. But we’ll only be able to read English messages so if the images are not in English maybe provide a translation as well.
Thanks.
refering to last post WP NOW IN ENGLISH LANGUAGE
On activation of S:P plugin the following text was on top of the Plugins screen.
Warning: Creating default object from empty value in G:\xampp\htdocs\wordpress\wp-content\plugins\simplepress\sp-api\sp-api-class-spcdb.php on line 552
The plugin generated 187 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.
Site Health shows:
Background updates ensure that WordPress can auto-update if a security update is released for the version you are currently using.Error A plugin has prevented updates by disabling wp_version_check().
Passed No version control systems were detected.
Passed Your installation of WordPress doesn’t require FTP credentials to perform updates.
Passed All of your WordPress files are writable.regards Jacob
- The topic ‘PHP Warning line 552 in sp-api-class-spcdb.php’ is closed to new replies.