WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic Widgets
[resolved] Endless loop on admin side (27 posts)

  1. byobrick
    Member
    Posted 1 year ago #

    The plugin is working fine on the front side but I end up in an endless loop on the admin side if I attempt to edit the settings of a widget. I noticed this after upgrading to version 1.5.4.

    I tried upgrading to 1.5.4.1 and downgrading to 1.5.3 and get the same results. The site is large. I increased the number of pages (it reports 139 but there are custom post types with hierarchy as well which take that substantially beyond the 500).

    I've made a donation. I'll be thankful for any direction you can give me.

    http://wordpress.org/extend/plugins/dynamic-widgets/

  2. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    First of all, thank you for your donation!

    Custom Posts can't be the problem, because those are not listed in the DW options. But it might point into the right direction. Do you have many taxonomies in a hierarchy?

  3. byobrick
    Member
    Posted 1 year ago #

    Yes, I do have 8 custom taxonomies:

    1. Availability - 3 terms
    2. Difficulty - 3 terms
    3. Lesson subject - 413 terms (hierarchical)
    4. Topic - 570 terms (not-hierarchical)
    5. Colliection - not currently being used
    6. Seminar widget group - 84 terms
    7. Course widget group - 25 terms
    8. Case study widget group - 12 terms

    In terms of custom post types:

    1. Courses - hierarchical - 720 posts
    2. Seminars - hierarchical - 440 posts
    3. Case Studies - hierarchical - 124 posts
    4. Live Answers - not hierarchical - 836 posts
    5. Events - not hierarchical - 150 posts
  4. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    I'm suspecting that 413 hierarchical terms might hit you into problems hiere. Do you know PHP? You can try to shut down the Taxonomies part and see if that helps just to prove it's indeed the issue here.

    Anyway, you cat try to comment out in ./mods/custompost_module.php:
    - line 17: self::customTax();
    - line 54: $tax_list = ...

  5. byobrick
    Member
    Posted 1 year ago #

    Is there a way to selectively remove taxonomies while retaining others? I use the widget group taxonomies for assigning widgets to the custom post types.

    However, I don't use big taxonomies when assigning widgets.

  6. byobrick
    Member
    Posted 1 year ago #

    I did try that but it throws a 500 server error.

  7. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    Stupid me, yes, of course... it can't find $tax_list anymore.
    See if this helps... Put this under line 54:
    $tax_list = array();

    There is no way of selectively removing taxonomies. The problem here is the building of hierarchical tree which takes too long. I think removing the hierarchy would be the only solution *OR* I can try to implement the same structure I did for pages which uses the WordPress Walker class.

  8. byobrick
    Member
    Posted 1 year ago #

    This taxonomy term list hasn't changed appreciably for a couple of months and the plugin did work fine.

    Is there a previous version that you would recommend that I try?

  9. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    It doesn't have to be the tree itself. It can be something else that takes up a bit more memory or something. Just too less to get the tree processed.

    I'm sorry, support for taxonomies has been added a long time ago. I'm afraid that a (very) old version of DW won't work at all anymore.

  10. byobrick
    Member
    Posted 1 year ago #

    I've just tested each version through 1.5.0 - with most plugins deactivated and the issue is the same.

    Can I hire you to customize this for me so that it will work?

  11. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    Let me first have a look if I can implement the Walker class here as well as I did for pages. That will probably solve the issue already.

  12. byobrick
    Member
    Posted 1 year ago #

    I didn't realize how critical this plugin was to my site until I couldn't change settings on a widget. Suddenly I realize how much I depend on the ability to selectively assign widgets.

    With something like 1500 posts, pages custom post types, several templates, 18 sidebars and 150 widgets this kind of control has become mission critical. I am happy to financially support something that I am so dependent on.

  13. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you very much for your offer. It's clear to me you really appreciate the effort I've taken into DW by making a donation to it.

    Until now no luck in finding a solution for you. WordPress does not support the overriding of the Walker class in this matter. Is a flat list (without hierarchy) something you could live with?

  14. byobrick
    Member
    Posted 1 year ago #

    Probably, especially if the terms are arranged in their hierarchy. The problem with using term id is that you can't tell which term is a child of another.

    How about a customization that excludes the big taxonomies. For example - unset a couple of the taxonomies from the array before passing it to the function that sorts the hierarchy?

  15. byobrick
    Member
    Posted 1 year ago #

    After you get the $taxlist can't we just unset the unnecessary taxonomies?

  16. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    I'm not sure. What I want to try is to have a limit in the number of terms in the taxonomy. When it passes the limit, the flat list will be used in stead of going through building a tree.

    There is another way tho for terms within the Custom Post Types. When you select the "Individual" option, you can select the widget in the term admin. Unfortunately it doesn't apply to the term archive.

  17. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, but that would be a hack now. However, I can always add a filter to that as well of course.

  18. byobrick
    Member
    Posted 1 year ago #

    The filter then allows me remove the offending taxonomies from the array from within one of my functions files. Most of the taxonomies I don't use. I really only use the widget groups.

  19. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, let's try that first. I think I do have your mail address (starts with "and"). Will send you a small update for this. I'll try later today or otherwise tomorrow.

  20. byobrick
    Member
    Posted 1 year ago #

    rick@byobwebsite.com - or the donation email address.

    FWIW I've tried using unset for both post types and taxonomies and it didn't fix it. I tried:

    $smaller_list = get_post_types($args, 'objects', 'and');
                            unset($smaller_list['courses']);
    
    			// Custom Post Type
    			self::$post_types = $smaller_list;

    and
    `$taxlist = get_taxonomies($args, 'objects', 'and');
    unset($taxlist['topics']);
    unset($taxlist['lesson-subjects']); '

  21. byobrick
    Member
    Posted 1 year ago #

    I found additional places where I needed to unset those taxonomies from the arrays. Now that I've done that it takes about 90 seconds to regenerate the dynwid-config page. But it does actually work now.

    Please do email me I would like to chat about customizing the plugin.

  22. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    Yeah, by heart it are two places as far as I can recall. I'll add the filter and send you the changed file.

  23. byobrick
    Member
    Posted 1 year ago #

    That'd be great. As it turns out my code didn't actually work. It works for existing widgets, so I can edit the settings of existing widgets, but it fails when I add a new widget.

    The failure is a 500 server error.

  24. jkurtley
    Member
    Posted 1 year ago #

    I am also having this problem. It seems when I try to edit code in the DW Text Inserts I cannot get the window to expand. Instead the entire page just seems to reload and I am unable to change anything.

  25. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    Are you sure we're talking about the same plugin, Dynamic Widgets, here? I have no idea what you mean with Text Inserts.

  26. jkurtley
    Member
    Posted 1 year ago #

    @Qurl - I believe so - within dynamic widgets there is an option to add a text widget - it seems to be on an endless loop - you are unable to expand anything to edit the widget inserts

  27. Qurl
    Member
    Plugin Author

    Posted 1 year ago #

    I don't think we're talking about the same. Dynamic Widgets does not create widgets, i.e. you can not add widgets. It only shows or hides widgets depending on rules you set.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.