Welcome! To use this support forum, please Login or Join Today!

   

WidgetClasses::dynamic_sidebar_params() should not be called statically

{name}
Rank

Total Posts: 8

Joined 2014-03-27

PM

 

Hi Casey,

I’m suddenly getting this error and I’m not sure where it’s coming from as I’m not using a dynamic sidebar plugin. I saw this post with the same error on a different theme, but the fix didn’t help.

Can you take a look and see what might be the problem?

Here’s the error:
Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method WidgetClasses::dynamic_sidebar_params() should not be called statically in .../wp-includes/plugin.php on line 192

The site is in development here.

Theme: Synapse - Version: 3.1.0
Child them: Version: 3.0.9

Any ideas on this?

Thanks!
John

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Hi, It looks like you’re still using Synapse v.3.1.0.

The issue you’re seeing was addressed in v.3.1.1:
http://www.simplethemes.com/wordpress-themes/changelog/synapse

The current version is v3.1.2.

With WordPress 3.9, we’ve moved all the shortcodes into a shared universal plugin, so when you update, you’ll be prompted to install the Simple Shortcodes and Widget CSS Classes plugins.

I see you’ve made some customizations (which are very nice) so it’s probably best to backup your current wp-content/themes directory just in case. I don’t see anything that would cause adverse effects, but it’s always a safe best to do so.

{name}
Rank

Total Posts: 8

Joined 2014-03-27

PM

 

Hi Casey,

Thanks for the response! I didn’t receive an email on your comment for some reason, just checked to see if there was a response. I will update the theme and see how it goes. Much appreciated and thanks for the nice comment about my customizations!

{name}
Rank

Total Posts: 8

Joined 2014-03-27

PM

 

Hi Casey,

I did the update on the theme, most everything went well and the errors are gone. I installed and activated the plugins you mentioned too.

A couple things:

1. I noticed that there is a malformed class tag on the latest post shortcode, but I couldn’t track it down or am not sure if it’s because of something I did wrong. This is the code:

<div class="" "postmeta="" small"=""

2. It seems as though something changed with the layout of the latest post shortcode. I was able to have the image on the left and the title and excerpt next to it on the right. I can’t get it to do that now as the formatting doesn’t seem to allow for it. Where can I edit the code that generates lastest posts shortcode? I can’t seem to locate it.

Thanks,
John

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Hi John,

Can you paste me what your shortcode looks like so I can test this?

{name}
Rank

Total Posts: 8

Joined 2014-03-27

PM

 
Casey - 16 June 2014 05:11 AM

Hi John,

Can you paste me what your shortcode looks like so I can test this?

Here it is:

[latest excerpt="true" thumbs="true" length="16" morelink="Read More ยป" num="3" cols="1" cat="3" order="DESC" height="70" width="70"

 

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Thanks,

I’ve updated the plugin to v.1.0.14. You should see a notification in your WP admin shortly.

This update fixes with the post date markup as well as a UI option to disable the post date entirely.
Regarding the second issue, it’s difficult to say without seeing the live link, but the previoys issue may have adverse effects on the rendering.

With the updated options, you might want to change your shortcode to:

[latest cols="1" type="post" num="6" thumbs="true" width="70" height="70" excerpt="true" length="16" date="false" morelink="Read More &raquo;" cat="3" orderby="date" order="DESC" offset="0"]
{name}
Rank

Total Posts: 8

Joined 2014-03-27

PM

 

That’s a great option you added, thanks for that!

The live link is here if you can take a look at the other issue.

Thanks!

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Hi, So moving the title to the inside would have adverse effects on exisitng users of the plugin when excerpts are disabled. I’ll have to look at it a little closer when I have time to rethink the entire function.

Currently, the best option is to dequeue the parent theme custom.js and re-enqueue it under the child theme directory with a little snippet to modify the latest shortcode DOM. This way when I find a more sensable workaround, it’ll be easy to go back.

So create a folder named “javascripts” in your child theme directory and copy only the parent theme custom.js into it.

In custom.js at the top, right after this line:

jQuery(document).ready(function($) {

Add:

$( ".latest-item" ).each(function(i,v) {
 var element = $(v).find('h4').detach();
 $(v).find('.latest-excerpt').prepend(element);
});

Now, in your child theme’s functions.php, just add the following to wire it up:

function my_custom_script() {
 wp_dequeue_script('custom');
 wp_enqueue_script('custom',get_stylesheet_directory_uri()."/javascripts/custom.js",array('jquery'),1.0,true);
}
add_action('wp_enqueue_scripts', 'my_custom_script');

{name}
Rank

Total Posts: 8

Joined 2014-03-27

PM

 

I will give that a try, Casey, thanks so much!

{name}
Rank

Total Posts: 8

Joined 2014-03-27

PM

 

That worked perfect, thanks for your help!

The function my_custom_script() didn’t work for some reason. Tried a few different ways to dequeue the custom.js script and could do that, but couldn’t then register and enqueue the child-theme version. I just put it in the parent version of custom.js for now.