Dynamic Widgets 1.4.2

I’m happy to announce the next release of Dynamic Widgets. Version 1.4.2 is now available for download and will probably soon be announced at your WordPress dashboard. The previous version had unfortunately a few nasty bugs which luckily could be resolved quickly.

The following has been added, fixed and tweaked:

  • Added QTranslate support.
  • Added hierarchical inheritance for Custom Taxonomies and Custom Post Types.
  • Added same behaviour in the Author list for WP < 3.1 as in WP > 3.1
  • Bugfix for PHP error in WPML module.
  • Bugfix for not showing WPML languages in WPML module.
  • Bugfix for PHP error in Single posts module when using WP < 3.1.
  • Bugfix for possible PHP notice when a child does not exist in the hierarchical tree.
  • Bugfix for wrong page count.
  • Broadend the capability for changing DW configuration from ‘switch_themes’ to ‘edit_theme_options’.
  • Disabled ‘WPSC Category’ when using WPEC > 3.8 as it’s now covered by Custom Taxonomies Archives.

WPEC 3.8 or higher user: Please note due to the use of Custom Posts and Custom Taxonomies, the ‘WPEC Categories” section has been removed in Dynamic Widgets and replaced by “Categories (Products)”. Copy over the settings you have in “WPEC Categories” to “Custom Taxonomy Archives: Categories” before updating to 1.4.2.

Change of requirements: The 1.4 branch of Dynamic Widgets will be the last branch to support WordPress < 3.0 and -Yes, it’s really going to happen- also the last for PHP4. The 1.4.2 version will probably be the last in this branch. So, when you’re still on a WordPress version lower than 3.0 you should really consider upgrading. When you see in the footer of the Dynamic Widgets pages after the version number “PHP4” you’re going to be in big trouble when you don’t take any action.

78 Comments to “Dynamic Widgets 1.4.2”

  • Hi, I did the update to the new relase, but it gives me this error: Oops! Something went terrible wrong. Please reinstall Dynamic Widgets . allready did the reainstall a few times but nothing..

    • I assume the previous version worked flawlessly. Have you uninstalled the previous version via the uninstall button?

  • I’ve installed the plugin and it shows great potential, however I’m afraid the theme I’m using is causing it not to work. I’m trying to hide a single widget from the front page and no matter how I set it up, it is still displayed. Any thoughts?

    • Hi Kevin, Check if your theme calls wp_head(). Click in the DW overview page at the bottom on ‘Advanced’. There you should be able to see if DW has wp_head() detected. When that’s not the case, I’d recommend to contact the theme developer.

  • I’ve installed Dynamic Widgets 1.4.2. No issue with the install.

    1.) I configure a widget to post by role, works.
    2.) I then went back and added a selected page, Does not work. Any combination of page selections does not work. Has to be set to ALL static pages. What’s the point in that?

    NOTE: wp_head() check: wp_head() is called.

    Please advise,
    Robert

    • All conditions work in a logical AND together. That means all conditions must be met to follow rules. The role option only works by setting a widget to OFF. When you add a static page condition, that means. The role has to be met AND the correct (ticked) page has to be displayed. Otherwise the rules will not be followed. So, e.g. You set the role to Administrator. That means only users within the Administrator group can see the widget. No matter what, where, etc. When you add a static page to that in default OFF (No) and tick the About page. The widget will only show up when a user in the Administrator group is looking to the About page. Any other combination will hide the widget.

      • Really? Of course this is understood, and is exactly the rules I followed.

        NOTE: Ticked pages OFF (no), select page I want widget to appear. NOTHING APPEARS. With or without a ROLE assignments. Does NOT work.

        Please advise,
        Robert

        • Just want to make sure we’re on the same page. Not everybody does understand this.
          Anyway, it seems in that case the theme you’re using is passing values to DW which are not understood. Normally DW goes in failsave and shows the widget no matter what. But as you say the widget is hidden, that means DW probably only gets a part of the needed information. Are you using a free available theme? So I can test out what is going wrong. A quick try might be to switch DW into OLD method mode. You can do this by clicking on ‘Advanced’ in the DW overview and ticking ‘Use OLD method’.

          • Thanks for the follow-up….

            I purchased my theme from CodeCanyon
            My website: http://www.mesa1.com

            Question: If I try OLD method mode can I switch back?

            Another thing I noticed. The only option that works is the Roles. Looking at Roles if radial button set to Yes, the boxes are grayed out and I can not tick them. All the other options when set to Yes or No, I can tick the boxes. Should this be happening?

            P.S. This product is exactly what I’m looking for. I hope we can get it to work.

            Thanks again,
            Robert

          • Yes, you can always switch back. The OLD method just uses another way of removing widgets. A bit radical way as DW then not completely follow the WordPress way of using ‘hooks’, but sometimes it’s the fix. There is a downside (of course). When you have visible sidebars and one of the sidebars becomes empty due to the DW rules, it may leave you behind with an empty sidebar, but still visible.
            When it doesn’t work with the OLD method, I’ve got another trick in my hat, but that needs some debugging and cooperation from your side.

  • Jacco,

    Switching to the OLD method seems to work. I’m a little held back about the down-side you mentioned. It works for now, but how about lets take a look at getting this to work the proper way, with regards to hooks and things.

    You mentioned cooperation on my side. What do you need?

    Thanks,
    Robert

    • I can imagine that. However, don’t bother it too much. The issue is probably your theme includes more pages (IDs) within one page. That confuses DW in ‘FILTER’ method. The switch to OLD makes DW look only to the first ID it comes across. In your case the correct ID. This was also the fix a while ago for another DW user. Unfortunately due to the way the hooks work in WP it’s not possible to have DW use only the first ID it comes across in FILTER method. Or at least, I haven’t found it (yet). The possible empty visible sidebar can be solved, but needs a small hack in the theme sidebar. You need PHP programming knowledge for that. I have written a blogpost about this some time ago.

      If you’re still interested in looking into the debugging trick, I’ll provide you with a slight modified file which needs to (re)placed into the dynamic-widgets directory. I’ll explain more about this process via email. Debugging will probably just confirm my thoughts what I’ve just written above as I’m sure for about 95% that’s the case.

      • Jacco,

        Okay I follow what you are saying, and read your blogpost. Correct me if I’m wrong. The only thing debugging will do for us is confirm your theory?

        I am willing to help you confirm your theory, but will it lead to a fix, or is using the OLD method a workable solution. Note, I am not experiencing any rendering issues. In my themed template there are 2 hard coded widgets in place, so there is never an empty sidebar.

        What do think? Is worth the effort?

        Thanks,
        Robert

        • Yes, it will probably only confirm my theory. Confirming my theory will not fix the problem as there is (currently) no fix. As you’re not experiencing any rendering issue, I’d suggest to leave it as is. To be honest, I don’t think it’s worth the effort.

          Just FYI: Having a fix for this, is on the list.

          • Jacco,

            Okay, I agree with your assessment. But I do appreciate you helping me out with this, and getting it to work. I look forward to using your plugin and watching its development. Yes, I’ll send a donation πŸ™‚

            …After a couple of days of testing. If it don’t blow-up the Internet, you got your donation.

            Thank you,
            Robert

          • Sure! No problem. Please let me know when you hit into another issue, which I doubt, but you never know. πŸ˜‰

  • It would be so helpful if there was a basic Getting Started document here. I get how you can stop widgets from appearing on all your pages but I don’t get how to add new ones in the same position on other pages. Top Right Sidebar and Bottom Right Sidebar seem to only be able to have one posting on them.

    • Hi Joanne,
      First of all… to prevent a misunderstanding, DW does not let you choose positions of a widget in the sidebars. DW only shows or hides widgets following the conditional logical rules you have set.
      Basicly if you want another widget to show up on the same spot as where you hide a widget, make sure those two widgets are next to eachother in the sidebar. Then set your rules for the to be hidden widget and the opposite rules for the other widget to appear. So, e.g. Hide a widget on
      static page A by leaving the default for static pages to ON (Yes) and tick page A. For the other widget to appear you switch the default for static pages to OFF (No) and tick page A again.

  • Okay I finally figured it out. Everything’s so easy except that it’s not!

  • Hi!

    Thanks for this great Plugin!!! I have one Question:
    How can I get the “Current Status” on my Links? IΒ΄m talking about Categories and Posts… Pages are working…

    Thanks
    Martin

    • I’m not sure I do understand what you’re asking. Can you please elaborate your question?

      • Hi, thanks for your quick reply!

        What I meant was – I click on the category “portfolio” – so the posts in this category are displayed in the sidebar with the help from your plugin as a “submenu”. I click on “photography” to see the content of this post. Now – and this is the question – I want that this link “photography” link is highlighted as current, so the user sees in which category/post he is…

        This function is already working in the mainmenu (access) from wordpress. There I can style the link, hover, visited, active AND the .current_page_item for example.

        So I need (I donΒ΄t know exactly how to do this or describe) a kind of “if this post id is active – class=”current_post_item” else “normal status”…

        I hope you know what I mean.

        Thanks for your help!

        Martin

        • Yes, I do understand now what you’re asking. Unfortunately what you want to achieve is beyond the scope of DW. DW only shows and hides widgets following the logical conditions you have set. It doesn’t alter the contents of a widget.

          • Could you add this feature to this Plugin? Or could you code that for me? I would pay for it…

          • I do take freelance work sometimes. Please give me some time to think about it. I’ll get back to you via email.

  • Hey Jacco,

    I usually doesn’t post comments, but i couldn’t use this plugin without saying thank for the great work you have done with this plugin. It works as its expected not like a lot of other plugins which i needed to modify and make them work.

    Thanks again πŸ™‚

    • Thanks for your compliments! πŸ™‚

  • Hi!
    First thank you for this great plugin, saved me lots of templating hours.
    I’ve got some question regarding hierarchical categories, in special about hidding categories by default: wouldn’t it be more usefull to have a choice like “apply to these categories and also in all thery childs” thing, maybe with a checkbox?

    It’s common to add new categories in sites and you have to check that “created” category afterwards in your dynamic widget config, so it would be a very useful feature (l think that other plugins already have it, like Conditional Widgets, although they are far from yours).

    Would it be possible to have it in your roadmap?

    Best,
    Vic

    • It is actually on the roadmap as I knew this question was coming sooner or later. It will be the same system as already implemented for Custom Posts, Static Pages and Taxonomies. Anyway, I’ll move this a few notches up… πŸ˜‰

    • Hi Vic,
      Just to let you know hierarchical inheritance for Categories has been added to development version 1.5b2. Please note this version is beta. However, I do not expect major bugs.

      • Great news!
        I’ll test the dev version in my prod environment (http://www.chch.es) for a while and see if it has any bugs.
        Have you got any bugtracking system?

        • Yes, I do use a bugtracking system (Mantis). But it’s only public read-only available for the current released version at https://qurl.nl/dynamic-widgets/issue-tracker/. I’m thinking about expanding the features for that, but that’s something for the long term.

  • This plug in is exactly what I was looking for .. I am using templatelite.com maple leaf theme. I checked in advanced settings and all is good with wp_header, I am able to set the default to (quick setup) and both widgets I specify disappear, however when I go back and adjust settings for the on specific pages that are password protected, it as if I have done nothing, I havent tried the old way yet, any ideas.

    Thanks
    ~Don

    • Hi Don,
      I have someone with about the same issue at the WP Forums. Or are you the same person? Unfortunately as what I wrote also at the WP Forums, I can’t activate Maple Leaf for some reson. I’m getting a blank screen and a bunch of errors in my debug log. That makes it extremely difficult for me to find out what goes wrong. The OLD method might be an idea to try out. The password protected pages are part of the theme or are you suing a plugin for that?

      • the password protected pages are just part of WP, I am the same person, I will give the old way a whirl, strange you couldnt activate that theme .. its running fine here πŸ™‚ .. Anyhow lets see what happens when I go the old way

        Thks

        • well no luck on the old way … perhaps I will look at changing themes unless you have another angle on this πŸ™‚

          • Hi Don,
            So, please correct me if I’m wrong. The problem only occurs on pages which are password protected by the WP system? Or does the problem also occur on unprotected pages?

  • the problem occurs on all pages, doesnt matter, if I do the quick setup and set everything to no .. the widget does disappear, however when I try to add it back in by static page, or any other method it doesnt show up… If you would like to have a closer look perhaps I am doing something wrong in the logic … email me donmartelca@yahoo.ca I will supply the admin password, I started looking at other themes but would rather not switch at the moment, certainly could donate if I can get this working πŸ™‚

  • I just downloaded DW and activated it however, it won’t allow me to open the settings. I get the alert message “You do not have sufficient permissions to access this page.”…I am the Administrator!

    DW version is 1.4.2
    I am using wordPress 3.2.1
    I am using a child modified version of the Simplicity template.

    Need help.

    • Hi Rob, Are you using or have you used WP Security Scan?

      • Hi Jacco:
        I have not even heard of it until your reply. Is it an automatically added plugin?

        –Rob

        • Hi Rob,
          Fortunately it’s not automatically added. Reason why I asked is that this plugin sometimes changes database table prefixes, but most of the time ‘forgets’ a few, leaving you behind with the error message you get. You also did not use a role change plugin? Normally you have as an Administrator all capabilities. For DW you need ‘edit_theme_options’ capabilities. Are other options within the “Appearance” menu working?

          • Hi Jacco:
            Yes, I can access all of the options within the Appearance menu. I don’t understand this point you stated:”For DW you need β€˜edit_theme_options’ capabilities.” ?? can you explain that a bit for me? I can access the edit template area within the Appearance menu, but I never edit my php there> I do my editing in a php editor on the files within the hosting root.

            Is there anything in the plugin code I can tweak to get around this message. Dynamic Widgets seem to be the widget I need to control the widget I need turned off on one of the pages. I have tried others, and while they load and edit properly, they just don’t work in turning off my widget.

          • Hi Rob,
            Ok, if you’ve never heard of the WordPress capabilities, don’t bother. As you can also access other items under Apperance, you’re good to go. That unfortunately does not solve your problem. I’ve been googling around about this issue. It can occur when upgrading to WP 3.0 or a change in the database table prefixes. Just to be sure: You did not upgrade WP recently? You did not move to another host? Are the other widget plugins you’ve tried disabled / removed?

          • Hi Rob,
            I think I’ve found the solution. I was able to reproduce the problem. It looks like in a few DW packages a file is missing (dynamic-widgets.php). Probably if you go to your plugin page, WP will disable DW as it can’t find a file. Just re-download DW and install. If you’re still having problems, let me know.

  • Hi Jacco, and thanks for all your help on this. I found and fixed the issue. The site was only using version 4 php and after upgrading it to the latest version of 5 DW now works beautifully.

    This is not my site, so I really didn’t know of the lower version of php until just now.

    –Rob

    • Good stuff! DW 1.4.2 should actually support PHP4… but apparently it doesn’t. Still I have no clue what’s causing that error message. I’m glad you were able to find out.

  • I’m having trouble getting 1.4.2 working with bbPress 2.0 activated. On the WordPress backend when I try to edit a widget, at the bottom of the list it stops loading around the area of the bbPress forums :

    Fatal error: Out of memory (allocated 68419584) (tried to allocate 16 bytes) in /home/xxx/public_html/wp-includes/wp-db.php on line 1383

    And a similar error, but in a different place:
    Fatal error: Out of memory (allocated 68419584) (tried to allocate 32 bytes) in /home/xxx/public_html/wp-includes/meta.php on line 341

    I tried increasing my memory to 96M but that didn’t have any effect. Any ideas?

    Thanks!

    • Looks like bbPress is using Custom Post Types these days. I guess you have quite a lot of data in the bbPress Forums, Topics and Replies. Probably that much it’s not possible to build up a list of that. I think I have to do some redesign work there. Probably by stopping support (for the time being) for individual Custom Posts.

      • Ah I see, yes your explanation makes sense! πŸ™‚ I have tried the dev version, but now a different error occurs when I click “edit” on a widget:

        Fatal error: Call to a member function getDWOpt() on a non-object in /home/xxx/public_html/wp-content/plugins/dynamic-widgets/mods/useragent_module.php on line 23

        Can I provide additional information for you to troubleshoot?

        • Ah yes, that’s because you just overwrote the files of course. Completely understandable. Just remove wp-content/plugins/dynamic-widgets/mods/useragent_module.php That module has been replaced by browser_module.php. When you use QTranslate, the same applies to that by removing qtranslate_module.php.

          • That got rid of the getDWOpt error, but a new one has popped up! Fatal error: Call to undefined function get_called_class() in /home/xxx/public_html/wp-content/plugins/dynamic-widgets/classes/dwmodule_class.php on line 64 (I tried removing the directory completely, and unzipped a fresh copy of the 1.5 dev version)

            edit: quick google search reveals http://php.net/manual/en/function.get-called-class.php is PHP 5.3+ only… that would be my problem! I’m still on 5.2.17. Let me ask me host if they can upgrade.

          • Bummer! I need to find a way to get it also running on a PHP version < 5.3. Thanks for letting me know. I must have overlooked that when I was working on that.

          • I can’t get upgraded to 5.3 yet so I’ll need to test a different version, whenever it becomes available πŸ™‚

          • Yeah, I was already afraid of that. I think I know how to fix it. Will try tonight… have to free up an hour or so somewhere…

          • OK, I think I have found a workaround. Development version 1.5b6 is now available. Thanks again for testing out this beta. πŸ™‚

    • OK, for a quick fix I’ve removed support for individual CPTs. It’s in the latest development version 1.5b5.

  • Hi there, great plugin, works all fine for me in Firefox but not in Internet Explorer.
    Is that a general problem? What could be the problem?
    Thanks.

    • What is the problem according to you? Did you set options for the browser? Cause that would actually be the only thing I can think of.

  • Hello,I translate your plugin into Simplified Chinese.I wonder if you are be interested in that?
    You can get the translation files here: http://hanolex-wordpress.stor.sinaapp.com/dynamic-widgets.zip

    • Hi hanolex,
      Thank you! πŸ™‚ I’ve downloaded the ZIP. I’ll do some quality testing and then integrate it into the repository. πŸ™‚

  • I am trying to display post counts for the certain categories that I have in my sidebar:

    for both of these, I have dynamic widgets that display the child categories of each of the parent categores, since there are so many, it would be helpful to have the post counts displayed….any tips?

    • I’m sorry, Dynamic Widgets does not alter content within widgets, it only show or hides widgets based on the rules you’ve set. What you’re looking for, if I understood you correctly, is a plugin / extension on the category widget for that. I can develop that for you on a commercial base.

      • Thank you for your help. I think that regular category widgets can display post count, but I appreciate the offer. Thank you.

  • Hi Jacco –

    We just started having trouble with your Dynamic widget icon not showing after we updated to WP 3.3. All the RSS feeds content that we placed in the widget is showing correctly. It’s just the icon that seems buggy. Should be just update to your latest version? Is it the 1.4.2 version? Thanks for your help w this.

    • So sorry… please disregard our message. Our icon problem belonged to another application and not to you! It’s all fixed now. thx for a great plugin.

      • Hi Lys,
        Ok, great πŸ™‚ Thanks for letting me know.

  • We just fixed our problem… the icon belonged to another application — not to you! So sorry for any inconvenience.

  • Is it possible to expand on the date is (the date)
    so that I can show only for time (time = 5 minutes)?

    Also am I able to add my own custom conditions similar to Widget Logic? If not is there a conflict to have both your and theirs installed at the same time?

    Thanks,

    Gwen

    • Hi Gwen,
      Yes, adding a time-module is possible. I’ll have it added to the wishlist.
      The custom conditions similar to WL, meaning writing your own PHP code is on the wishlist for already a long time. There are however a couple of (security) issues which stops me from adding this functionality to DW. But when I look to the download stats of WL, it looks like nobody does really care about that.
      Using DW and WL together is not something I recommend.

  • Quick question- is there a known bug where, when editing a post, the WordPress autosave causes the selected items in the Dynamic Widgets sidebar to disengage?

    I’ve tried to search around to see if the subject has been discussed but couldn’t find anything.

    I have a variety of Twitter feeds using a Twitter Widget plugin, and when editing a post, I select which feed appears in the sidebar.

    If I select the necessary feed and click update, all is okay. But if I linger on the edit page too long, long enough for the autosave to kick in, the selection is removed.

    Similar thing for scheduled publishing. Items that are scheduled to publish in the future, even if saved with the right Dynamic Widgets selection, when the post goes live at the scheduled time, the DW selections are gone.

    Just curious if anyone has experienced such an issue with WordPress autosave and auto publishing features.

    • Hi Imran,
      Are you using some plugins that also do some work at a post? The only thing I can think of is a change of parent post ID when autosave kicks in. DW uses the parent postID as a reference to the post for detection. It looks like the parent postID is changed for some reason causing the loose of the DW settings.

      • Jacco – taking that into consideration, I went one by one deactivating every plugin just to see if there was any difference (although DW is my only complex plugin in this regard) but every single time, when autosave happens, my DW checked boxes on the Post are disengaged.

        I’ll keep exploring based on your note to try to get to the bottom of this. I was just wondering if there was a known issue related to autosave.

        • Thanks for letting me know. I’ll do some tests myself also.

          • FYI Jacco, I have manually disabled the autosave in my WordPress and it does indeed fix the issue, though not a true fix. So it does seem like an ID jumping issue, which seems to tie into the scheduled-publishing issue.

  • Hey Jacco, great plugin!

    I’m getting the same fatal error type message as Kai was getting:
    Out of memory (allocated 67895296) (tried to allocate 40 bytes) in /home/XXX/XXX/etc.

    If you could help me out, I’d appreciate it.

    • Hi Matt,
      You can use the latest development version. That will probably fix the issue. It did for Kai.

  • It worked! Thanks.