• Resolved niksap

    (@niksap)


    Hi,
    A couple of months ago when I installed the plugin the My favourites list page was working fine. After updating WP a couple of times the fav list page always returns the “There are no favorite items” message. Any clue ?
    thanks
    Regards
    Nicola

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello, @niksap
    Thank you for your question.

    What is your WordPress version?
    Also, are you using a cache plugin (WP Super Cache, WP Fastest Cache, etc.) ?

    Thread Starter niksap

    (@niksap)

    Hi
    I am on WP 5.9.3 (auto update) and as my site is still under development I am not using any caching plugin yet, I will before going live (any suggestion ?)
    thanks

    Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello, @niksap

    I am also on WP 5.9.3 and it is working fine.

    Unfortunately, this plugin is not compatible with the cache plugin, so I figured it was the cache.

    But if it is not a cache issue, then we need to look for another problem.

    Is there anything else that has changed from a few months ago?

    Support for cache plugins is currently being tested. and the related topic.

    thanks

    Thread Starter niksap

    (@niksap)

    Hello,
    I am developing the site with Toolset and Kadence free theme and some other plugins. Toolset has its own caching, but it was working fine before. I
    I did some more testing:

    1. used [ccc_my_favorite_list_custom_template style=”none”] and no function ccc_my_favorite_list_custom_template( $my_favorite_post_id ) { } in functions.php
    Output: No results, but get the “There are no favorite items.” message

    2. used [ccc_my_favorite_list_custom_template style=”none”] + function ccc_my_favorite_list_custom_template( $my_favorite_post_id ) { } in functions.php
    Output: No results and no message

    3. used [ccc_my_favorite_list_results class=”” style=””] and no function ccc_my_favorite_list_custom_template( $my_favorite_post_id ) { } in functions.php
    Output: No results and no message

    Am I missing anything ?

    Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello, @niksap
    Thanks for your reply.

    (1) is the message (“There are no favorite items.”) because there is no function.

    (2) is how the contents of the function (ccc_my_favorite_list_custom_template) are written?

    (3) does not require its own function. However, I do not know why neither the message nor the result is displayed.

    Is the following shortcode in place?
    Do they work?

    Shortcode: [ccc_my_favorite_select_button post_id="Your post_id"]
    Shortcode: [ccc_my_favorite_list_menu]

    Thread Starter niksap

    (@niksap)

    Hi, any news ? thanks

    Thread Starter niksap

    (@niksap)

    oops sorry didn’t see your reply I’ll let you know soon thanks

    Thread Starter niksap

    (@niksap)

    To make it simple I replaced the custom_template with list_results. I can see the message now, but it shows even if I select some favorites. The HTML the page generates is the followig (4624 is the post ID):
    <a href="#" class="ccc-favorite-post-toggle-button save" data-post_id-ccc_favorite="4624"><span class="text"> Favorite ?</span></a>
    It looks ok but still favourite posts are not listed.
    I placed the [ccc_my_favorite_list_results class=”” style=””] shortcode in a /shortcode block. Same with [ccc_my_favorite_list_menu]
    Any clue ?
    thanks

    • This reply was modified 2 years, 7 months ago by niksap.
    • This reply was modified 2 years, 7 months ago by niksap.
    Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello, @niksap
    Thanks for your reply.

    I have a site where each The following is a guide to the HTML generated from the shortcode.

    I am able to save one favorite and display it in a list.

    What difference does it make?

    Shortcode: [ccc_my_favorite_select_button post_id="29"]

    <div class="ccc-favorite-post-toggle" data-ccc_my_favorites-select_button-style="1"><a href="#" class="ccc-favorite-post-toggle-button" data-post_id-ccc_favorite="29"><span class="text">Favorite</span></a></div>

    Shortcode: [ccc_my_favorite_list_menu]

    <div class="ccc-favorite-post-count active" data-ccc_my_favorites-menu-style="1"><a href="https://my_website_com/favorites/"><span class="num">1</span><span class="text">Favorites</span></a></div>

    Shortcode: [ccc_my_favorite_list_results]

    <div id="ccc-my_favorite-list" data-ccc_my_favorites-list-style="1" data-ccc_my_favorite-excerpt="0" data-ccc_my_favorite-posts_per_page="100">
    <div class="header-ccc_favorite clearfix">
      <p id="ccc-favorite-count"><span class="name">Favorite item</span><span class="number">1</span><span class="found_posts" style="display: none;"></span><span class="unit"></span></p><!-- /#ccc-favorite-count -->
      <div class="ccc-favorite-post-delete" data-ccc_favorite-delete_all="true"><a href="#" class="ccc-favorite-post-delete-button"><span class="text">Delete all</span></a></div><!-- /.ccc-favorite-post-delate -->
    </div><!-- /.header-ccc_favorite -->
    
    <div class="post-ccc_favorite">
        <div class="list-ccc_favorite clearfix">
        <div class="img-post">
          <a href="https://my_website_com/29/">
            <div class="img-post-thumbnail has_post_thumbnail"><img src="https://my_website_com/wp-content/uploads/2022/04/my_post_img-wp-1024x576.jpg" alt="My Post Title" loading="lazy"></div>      </a>
        </div><!-- /.img-post -->
        <h3 class="title-post"><a href="https://my_website_com/29/">My Post Title</a></h3><!-- /.title-post -->
            <div class="ccc-favorite-post-toggle"><a href="#" class="ccc-favorite-post-toggle-button save" data-post_id-ccc_favorite="29"><span class="text">Favorite</span></a></div><!-- /.ccc-favorite-post-toggle -->
      </div><!-- /.list-ccc_favorite -->
      </div><!-- /.post-ccc_favorite -->
    <div class="results-more"><a href="#" id="ccc-my_favorite_posts-load_more-trigger" style="display: none;"><i class="icon-ccc-my_favorite-refresh"></i>Load More</a></div><!-- /.results-more -->
    <div id="ccc-my_favorite-list-loader" style="display: none;"><div class="loader">Loading...</div></div><!-- /#ccc-my_favorite-list-loader -->
    </div>

    thanks

    Thread Starter niksap

    (@niksap)

    Hello Takashi
    I can see some differences in the ccc_my_favorite_select_button code.
    In the code I sent you above I read class=”ccc-favorite-post-toggle-button save” while in your code I read class=”ccc-favorite-post-toggle” (no more -button) and the save class is no more. Is there a new version of the plugin or your docs are obsolete ? I don’t know …. I am on version 1.4.0. If I set a favorite then change page then go back to that post page the heart icon is still on so that means that the favorite IS saved. But the list is empty.

    As far as the list code is concerned I cannot tell because all I can see is:

    <div id="ccc-my_favorite-list" data-ccc_my_favorites-list-style="none" data-ccc_my_favorite-posts_per_page="custom_template">There are no favorite items.</div>;
    thanks

    • This reply was modified 2 years, 7 months ago by niksap.
    • This reply was modified 2 years, 7 months ago by niksap.
    Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello, @niksap
    Thanks for your reply.

    I am using WordPress 5.9.3 and this plugin Ver. 14.0.

    Sorry. I made a mistake in the HTML to copy. When we save the file, “.save” will be added.

    However, the “[ccc_my_favorite_select_button]” generate a <div class="ccc-favorite-post-toggle"> as the parent element of the <a class="ccc-favorite-post-toggle-button">.

    Shortcode: [ccc_my_favorite_select_button post_id="29"]

    <div class="ccc-favorite-post-toggle" data-ccc_my_favorites-select_button-style="1"><a href="#" class="ccc-favorite-post-toggle-button save" data-post_id-ccc_favorite="29"><span class="text">Favorite</span></a></div>

    Q1: Is it still the same result with the standard shortcode([ccc_my_favorite_list_results])?

    Q2: Is HTML of the “[ccc_my_favorite_list_menu]” count up?

    thanks

    Thread Starter niksap

    (@niksap)

    Hello Takashi,
    thanks for replying. The code generated by select_button is exactly the same as yours and it includes the “save” class. The button on the page toggles the heart icon correctly.
    Q1. I have [ccc_my_favorite_list_results] in my favorite list page but the result is always “There are no favorite items.”.
    Q2. Currently I am not using [ccc_my_favorite_list_menu]. Is this mandatory ? what is it for ? I cannot find documentation about it. Please explain, thanks

    Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello, @niksap
    Thanks for your answer.

    “[ccc_my_favorite_list_menu]” is not mandatory. However, It will determine if it is stored correctly and pulls out all optional features.

    For example, you can put this shortcode in your theme’s header.php.
    Or you can put it on your favorites list page.

    Please see the related topic for usage.
    And another topic.

    Thanks

    Thread Starter niksap

    (@niksap)

    Hello Takashi
    I placed “[ccc_my_favorite_list_menu]” ina shortcode block on my list page just to see if it works, but I got no output. Does this mean anything to you ? thanks

    Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello, @niksap
    Thanks for your reply.

    The absence of “[ccc_my_favorite_list_menu]” indication means that the favorite posts are not stored in DB or local storage.

    If the status of the favorite post is “publish” but it is not working well, it may be incompatible with your theme or another plugin.

    For example, you may want to try the following steps in a test environment.

    1. Stop other plugins.
    2. Try with a standard theme.

    Thanks

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘List doesn’t work after WP update’ is closed to new replies.