• Resolved FinnJackson

    (@innackson)


    This is the error message WordPress sent me.
    Can you resolve this?
    Thanks.

    WordPress caught an error with one of your plugins, WordPress Popular Posts.

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 6.0
    Active theme: Catch Evolution (version 4.1.3)
    Current plugin: WordPress Popular Posts (version 6.0.0)
    PHP version 7.4.30

    Error Details
    =============
    An error of type E_ERROR was caused in line 129 of the file /home/finnjackson/thechurning.net/wp-content/plugins/wordpress-popular-posts/src/Themer.php. Error message: Uncaught TypeError: Argument 1 passed to WordPressPopularPosts\Themer::get_theme() must be of the type string, array given, called in /home/finnjackson/thechurning.net/wp-content/plugins/wordpress-popular-posts/src/Output.php on line 187 and defined in /home/finnjackson/thechurning.net/wp-content/plugins/wordpress-popular-posts/src/Themer.php:129
    Stack trace:
    #0 /home/finnjackson/thechurning.net/wp-content/plugins/wordpress-popular-posts/src/Output.php(187): WordPressPopularPosts\Themer->get_theme(Array)
    #1 /home/finnjackson/thechurning.net/wp-content/plugins/wordpress-popular-posts/src/Widget/Widget.php(397): WordPressPopularPosts\Output->build_output()
    #2 /home/finnjackson/thechurning.net/wp-content/plugins/wordpress-popular-posts/src/Widget/Widget.php(169): WordPressPopularPosts\Widget\Widget->get_popular(Array)
    #3 /home/finnjackson/thechurning.net/wp-includes/class-wp-widget.php(393): WordPressPopularPosts\Widget\Widget->widget(Array, Array)
    #4 /home/finnjackson/thechurning.net/wp-includes/widgets.php(202

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @innackson,

    Thanks for the report. I’ll look into it as soon as possible.

    For the time being, please follow these instructions but on step 1 you’ll want to download version 5.5.1 instead of the development one.

    Once I’ve fixed the issue I’ll leave a comment here to let you know so you can help me test it.

    Thread Starter FinnJackson

    (@innackson)

    Hello Hector @hcabrera ,
    I’ve uploaded the previous version, thank you.
    I look forward to receiving the new version and then testing it as you say.

    (Also I have difficulty loading the WPP widget into the widgets area of my theme (Catch Evolution (version 4.1.3)) but I am guessing that is a theme issue, rather than an issue with the widget.)

    Thanks again,
    Very best,
    Finn

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hey @innackson,

    If you don’t mind, could you please share a screenshot of the settings you’re using with the WordPress Popular Posts widget? (See Appearance > Widgets > [Your Sidebar] > WordPress Popular Posts). Might help me find out why you’re getting that error as I’m not able to reproduce it myself.

    Thread Starter FinnJackson

    (@innackson)

    Hi,
    Sure.

    I’m using Appearance > Widgets > Manage with live preview
    (since the alternative doesn’t work at all)

    Then I get the following ways to customise the widget:
    https://www.thechurning.net/wp-content/uploads/2022/06/Screenshot-2022-06-28-at-13.57.38.jpg

    https://www.thechurning.net/wp-content/uploads/2022/06/Screenshot-2022-06-28-at-13.57.49.jpg

    https://www.thechurning.net/wp-content/uploads/2022/06/Screenshot-2022-06-28-at-13.59.52.jpg

    https://www.thechurning.net/wp-content/uploads/2022/06/Screenshot-2022-06-28-at-14.00.00.jpg

    NB
    If I try adding the WPP widget again from scratch then it places the whole widget inside a grey-line box in the sidebar (making it smaller than the available width) and it makes the title a smaller font than all the other titles in my sidebar. So I’ve stuck with the editing method I’ve sent you screenshots of, even though it’s clunky.

    Thanks again

    Plugin Author Hector Cabrera

    (@hcabrera)

    That looks kind of broken.

    Just installed the Catch Evolution theme (version 4.1.3, the free version from www.remarpro.com) on a new WordPress install and this is how the widget looks like to me on the Customize screen:

    Please try the following:

    1. Remove that WPP widget completely from your Widgets area.
    2. Click on the “Add block” button (the button with a plus sign in it) to add a new block.
    3. Find the WordPress Popular Posts block. You’ll identify it by its flame-like icon (as seen on the screenshot above).
    4. Configure it to your liking, then save changes.

    Let me know how that goes, @innackson.

    Thread Starter FinnJackson

    (@innackson)

    Hi,
    Yes, I can access the version with the flame but it doesn’t give me an end result that matches the rest of my sidebar.

    The instructions I get are:
    https://www.thechurning.net/wp-content/uploads/2022/06/Screenshot-2022-06-28-at-15.13.36.jpg

    https://www.thechurning.net/wp-content/uploads/2022/06/Screenshot-2022-06-28-at-15.13.47.jpg

    https://www.thechurning.net/wp-content/uploads/2022/06/Screenshot-2022-06-28-at-15.13.54.jpg

    The result this gives is:
    https://www.thechurning.net/wp-content/uploads/2022/06/Screenshot-2022-06-28-at-15.14.06.jpg

    (Notice the non-bolded title and the unnecessary box around the posts, reducing the amount of space available and no longer matching the rest of the information in that sidebar.)

    What I want it it look like is this:
    https://www.thechurning.net/wp-content/uploads/2022/06/Screenshot-2022-06-28-at-15.14.13.jpg

    Because this style matches the rest of the existing sidebar.

    I have tried deleting the existing (messy interface) widget before and inserting the new widget (with flame). Yes, the interface was cleaner. But the output no longer matched the rest of the sidebar. It made the site look messy.
    I then had to reinstall a backup and make several changes to get the site back to how it should be.

    So I am going to keep the old widget (despite its messy interface) until I can be sure that the new flame widget will give me the output I want, to match the rest of the site.

    Thanks again,
    Finn

    Plugin Author Hector Cabrera

    (@hcabrera)

    Ah, that grey border is not coming from the WPP block. My guess it that it’s being added by the theme itself as I saw that too on my test site.

    I’m not near a PC now but when I get back I’ll see if I can find out where that grey border and padding are coming from and -hopefully- a way to remove them.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Alright, so I had a look and yes most of these styling issues you’re seeing with the WordPress Popular Posts block are being caused by the Catch Evolution theme. They don’t happen with the “classic” WordPress Popular Posts widget because its HTML structure is slightly different from the block which by mere coincidence prevents these formatting issues from occurring ??

    Anyways, here’s what you want to do @innackson:

    1. Add the following CSS rules to the “Additional CSS” section from the Customizer:

    aside.widget > .popular-posts {
    	padding: 0;
      border: none;
    }
    
    aside.widget > .popular-posts > ul {
    	margin-left: 0;
    }

    The end result should look like this:

    Screenshot of the Additional CSS section from the customizer

    2. Now, to take care of the heading not being bold and while still being on the Customize screen:

    1. Go to Widgets > Main Sidebar.
    2. If you haven’t done so already, replace the “classic” WordPress Popular Post widget with the block version.
    3. Change its settings according to your preferences, then scroll down to the “HTML Markup Settings” and tick “Use custom HTML Markup” option. This will enable additional fields which we’ll be tinkering with next.
    4. Set the “Before Title” field to <h2 class="widget-title">

    If everything went well, you’ll see that the Popular Posts heading is now bold. Screenshot below for reference.

    Screenshot of WPP's HTML input fields

    3. When you’re done, click on Publish to save changes.

    4. For changes to take effect immediately for your visitors as well it might be a good idea to clear LiteSpeed Cache’s page cache. (Check its settings page to learn how to do so, I’m unfortunately not familiar with it to provide guidance with this but shouldn’t be too difficult to find).

    Completely unrelated note: that Catch Evolution theme needs some work for it to be accessible friendly. I noticed that, for example, your widgets are not using the right heading level: they should be H2 tags but the theme is using H3s instead.

    One major reason why you’d want your theme to be accessible friendly is that, if you’re in the US and I guess this applies to some European countries as well, the government can and will fine you if your site is not ADA compliant.

    Just some food for thought.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Oh, and after all that, once you switch to the WordPress Popular Posts block please try upgrading to plugin version 6.0 and let me know whether this fatal error you originally reported still happens.

    Thread Starter FinnJackson

    (@innackson)

    Hello @hcabrera,

    I have done all that, thank you. (I would have had no idea how to write the extra CSS etc, but do know enough to add it.)

    The new plugin now works well. I have deleted the legacy plugin. And I have updated back to WPP version 6.0.0 and all is (seems to be) working fine.

    THANK YOU.

    I think I saw a “Buy me a coffee / PayPal” link on your website…
    I’ll look for it now but if you post it here then I will find it faster.

    THANK YOU again for your help/support.

    Plugin Author Hector Cabrera

    (@hcabrera)

    That’s awesome news. Now I know that that error is coming from the “classic” WordPress Popular Posts widget. That’ll narrow things down a lot so, again, thanks for your patience and for your assistance with all this.

    THANK YOU again for your help/support.

    You’re most welcome ??

    I think I saw a “Buy me a coffee / PayPal” link on your website…
    I’ll look for it now but if you post it here then I will find it faster.

    Many thanks in advance! You’re too kind!

    These are my donation links, feel free to use whichever you like:

    Have a nice day!

    • This reply was modified 2 years, 8 months ago by Hector Cabrera. Reason: Fixed typos
    Thread Starter FinnJackson

    (@innackson)

    Have a good day yourself and thank you again

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Site error with WPP v6.0.0’ is closed to new replies.