Support » Plugin: WP LIST PAGES BY CUSTOM TAXONOMY » Problem deactivating plugin

  • Resolved Willem 2

    (@willem-2)


    Hi Andrea,

    I had to deactivate the plugin to test wordpress. After deactivating it the plugin didn’t work any more. It was not presented in the frontend. I also got the warning that I had to update pbytax_template.php I could resolve the problem by removing the plugin and installing it again. I tell you this to help you and other people who have this problem.

    Thanks for your plugin!

    Merry Christmas and a happy New Year.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author piccart

    (@piccart)

    Hello Willem!

    thanks for reporting this problem, I will investigate!

    Just to better understand the situation, you have deactivated the plugin and then when you tried to re-activate you couldn’t see it in the list of plugins? Or rather it was there but when you clicked to activate it won’t activate? or it activate and the widgets were there in the admin panel but they didn’t display in frontend?

    and which notice have you got regarding the template? was it just a warning (suggested to update), or was it an error (you must update the template)?

    I think it could be some sort of conflict with cookies or options saved from old versions of the plugin, or the custom template that comes from an old version and it’s not fully compatible. Maybe try to re-make your custom template starting from a copy of the latest template file, and adding back your edits.

    by the way, I’ve added a few more options and other functionality in the meantime, so maybe you don’t actually need the custom template anymore. Remind me which are the customisations that you have in your template file and I’ll see if can be achieved without it, and eventually use a small function to put in your theme’s functions.php instead. 😉

    Merry Christmas!

    Thread Starter Willem 2

    (@willem-2)

    Hello Andrea,

    I could see the plugin in the plugin-list after re-activating it. Despite it was re-activated it couldn’t been seen by the visitors in the front-end.

    The warning that I got in the back-end (dashboard), was the warning that I had to update the template. (wrong version number)

    In the template I replace the next code <option value=”#”><?php echo $dropdown_text; ?> </option> with: <option value=”#”><?php echo $dropdown_text; ?> – <?php echo count($pbytax_posts); ?> – titels .. </option>

    I also change the text “Browse ..” in the widget in: “Kies hier uit”

    See for the results: http://www.razenberg.nl

    Thanks for your response.

    Willem

    Plugin Author piccart

    (@piccart)

    Hello!

    was the warning telling that you must update (red border and you cannot close it), or was it only the yellow soft warning telling that there is a new version and it’s better to update, but you can close the warning and carry on?

    I’ve done some tests and couldn’t replicate the problem. I am nearly sure that it was something related to your custom theme file but I’m not sure what.. probably something going wrong due to the fact that you started using the plugin since very early times and your first custom template file was made from a very old version.

    Anyways, I’ve now tweaked a bit the plugin so that you won’t need to customise the file at all. 🙂

    Update the plugin and add this to your theme’s functions.php:

    /**
     * Add the Posts Count to the text/title for the dropdown
     * of Pages By Custom Taxonomy widget
     *
     * @hooked to 'pbytax_dropdown_title'
     *
     * @param string $dropdown_text     text string as per widget options
     * @param array $instance           full list of current widget options
     * @param array $data               ( 'count' => count($pbytax_posts) )
     *
     * @return string
     */
    function bwd_add_count_to_pbt_dropdown_title( $dropdown_text, $instance, $data ) {
    
    	if ( ! isset($data['count']) ){
    		return $dropdown_text;
    	}
    
    	$dropdown_text .= ' - '. $data['count'] .' - titels ..';
    
    	return $dropdown_text;
    }
    add_filter( 'pbytax_dropdown_title', 'bwd_add_count_to_pbt_dropdown_title', 11, 3 );

    Then make a copy of your custom template just to be safe, and delete it from the website.

    at that point the plugin will pick the default template file, which now contains a filter-hook. And the above function will use that filter to add the counter (and the “titels” ) to the dropdown text.

    give it a go and let me know if you need help with it.

    cheers!

    Thread Starter Willem 2

    (@willem-2)

    Hello Andrea,

    The code works fine. This is a better/nice solution. Thank you!

    I don’t remember it but I think it was the yellow warning.

    Willem

    Plugin Author piccart

    (@piccart)

    ok great!

    I’m restructuring the plugin and one of the things I am focusing on is indeed the template structure and the procedure to customise them.

    I want to allow for many quick customisations without actually having to create a custom file, and I will break the template into smaller sub-parts, so that if someone really needs to change something within that code, they can create only a custom-part file and this will reduce the risks for errors, and also they will have to update their template only if I modify that very template-part, which will happen less often.

    Thread Starter Willem 2

    (@willem-2)

    Hello Andrea,

    Maybe it’s a problem, maybe not. After I removed en reïnstalled the plugin I couldn’t activate it in the page where you select a new plugin. I had to go to the plugin-list and activate it right there.

    Willem

    Plugin Author piccart

    (@piccart)

    that’s very weird…
    I’ve tried to deactivate and remove, then I went to “install plugins”, searched for my plugin, clicked “install”, then “activate” and it worked normally…

    what exactly was happening to you?

    and when did this happen? Have you already deleted your custom template when you have removed/reactivated the plugin?

    have you removed the plugin from the admin panel, or have you manually deleted the files from your website?

    does it happen if you do it again? I have the feeling that might have been just a temporary fail of the ajax request which wp sends when you click these buttons.

    Thread Starter Willem 2

    (@willem-2)

    Hello Andrea,

    I removed the plugin once more in the admin panel (the page with the plugin-list). After this I installed the plugin and activated it in the page with the new plugins. Now I don’t have the problem any more. So everything is resolved.

    Thanks!

    Willem

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Problem deactivating plugin’ is closed to new replies.