PHP Error
-
I notice that khansariamirreza reported this error before, and that that report has been marked as “resolved.” However, I am getting exactly the same error, namely:
wp-content/plugins/posts-in-sidebar/posts-in-sidebar-widget.php:95Since you apparently couldn’t see it before, could you, perhaps, try using Query Monitor to see the error message?
Thanks for looking into this!
-
In my test environments, I can’t see this PHP notice. I tried Query Monitor and nothign is reported.
That notice could be generated by some weird interaction with some plugin.
Could you test Posts in Sidebar in a test environment whithout installing any plugin?
Thanks for responding!
I have now tried deactivating all other plugins, but it made no difference. Then I switched to the twentyfourteen theme, and the problem disappeared. So it seems to be a theme conflict, but actually it’s more complicated than that.
I am using the theme Tiny Forge, which is based on an amalgam of previous default themes, so there should be no problem with it. And, sure enough, if I switch to that, there’s no problem with this plugin. However, as soon as I make a child theme from Tiny Forge (in fact, it ships with one) the problem recurs.
So the issue seems to be something to do with child themes (or, at least, a child theme of Tiny Forge). Very odd!
I just installed Tiny Forge theme and no problem here. Then I created a child theme of Tyny Forge and no problem.
My child theme is made with the
style.cssfile only, which has these lines:/* Theme Name: Tiny Forge Child Theme URI: http: //www.example.com Description: Child theme for Tiny Forge theme Author: Aldo Author URI: http://www.example.com Template: tiny-forge Version: 1.0 */ /* * Imports the style.css of the parent theme * ***********************************************************************/ @import url("../tiny-forge/style.css");Could you share with me your child theme?
My child theme is simply the one that comes packaged with Tiny Forge (in
tiny-forge/inc/tiny-forge-child-example.zip).One difference that strikes me immediately is that this doesn’t use
@import. It uses the much better technique of enqueuing scripts and CSS from its ownfunctions.phpfile.Just installed the child theme from Tyny Forge and nothing happens (i.e. nothing is reported).
Well, I guess that’s where we came in!
I am going to re-check everything because I must have missed something.
I’m at a complete loss. I have deactivated every plugin except Posts in Sidebar and Query Monitor, activated a clean child theme of Tiny Forge, and the error shows up. If I switch to the parent theme, no problem. I tried reactivating each plugin one by one with the parent theme, but still no problem. Back to the child theme, and it’s there.
So it’s something to do with the child theme, but I have no idea what. To make matters worse, this is happening on my localhost development installation, where I am getting just the one error. I have just activated Query Monitor on my live site, and it shows SEVEN errors, including this one.
The differences (so far as I know) are that my localhost setup is running 5.3.10-1ubuntu3.11, MySQL 5.5.37, and Apache 2.2.22, whereas the live site is running PHP 5.4.27, MySQL 5.6.16, and Apache 2.2.26.
Does this, perhaps, provide any clues?
My localhost environment is:
PHP 5.5.9-1ubuntu4 MySQL 5.5.37About the “error”, please note that it’s only a PHP notice, and it’s safe. It only says: Hey, the variable $xyz is not defined”.
About the seven errors you see in your live site, are they real errors or only notices? Are they generated by my plugin or by anything else?
The seven issues are as follows:
Undefined index: container_class wp-content/plugins/posts-in-sidebar/posts-in-sidebar-widget.php:55 Undefined index: post_not_in wp-content/plugins/posts-in-sidebar/posts-in-sidebar-widget.php:76 Undefined index: image_before_title wp-content/plugins/posts-in-sidebar/posts-in-sidebar-widget.php:89 Undefined index: utility_after_title wp-content/plugins/posts-in-sidebar/posts-in-sidebar-widget.php:95 Undefined index: cached wp-content/plugins/posts-in-sidebar/posts-in-sidebar-widget.php:136 Undefined index: cache_time wp-content/plugins/posts-in-sidebar/posts-in-sidebar-widget.php:137 Undefined index: container_class wp-content/plugins/posts-in-sidebar/posts-in-sidebar-widget.php:144
The topic ‘PHP Error’ is closed to new replies.