Support » Plugin: Favorites » HTML stripped from “No Favorites” text when “Cache Enabled on Site” is ON

  • This bug report is for Version 2.1.6.

    How to reproduce:

    1. In the plugin configuration, “General” tab, set “Cache Enabled on Site” to ON (check the checkbox).

    2. In the “Display & Post Types” tab, for the “No Favorites Text” setting, input a text that contains HTML. For example, add an A tag with a link into the text.

    3. Create a page and use a shortcode as its content, for example:
    [user_favorites user_id="" include_links="true" site_id="" post_types="" include_buttons="false"]
    Publish the page.

    4. Open the page in the browser.

    You’ll see that the “no favorites” text with the link is there for a moment (for 1 second or less), but then it disappears.

    The issue is with the “Cache Enabled on Site” setting. When it is ON, it causes the Favorites content to be injected on page load with AJAX request.

    I inspected AJAX requests and found out that a request to admin-ajax.php that returns the “no favourites” text WITHOUT HTML IN IT. This no-html version is then injected in the page, and that’s why the link that was there disappears immediately.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘HTML stripped from “No Favorites” text when “Cache Enabled on Site” is ON’ is closed to new replies.