Hi,
the favorite button shows up as marked on all posts when accessing the website as anonymous user. When logged in, the button works fine.
Anonymous users favoriting is disabled. I’ve cleared the browser’s cache and cookies but issue remains.
Tagging @takashimatsuyama for help please ?? Thank you in advance
]]>Hi, I’ve managed to display some fields in the list of favorited posts thanks to @psolga and their previous post. However when I try to add custom fields, it’s not working. Do I need to create custom fields beforehand? How?
]]>Blog posts are saved only on the preview site. We followed the tips described in the article. For sites that use wpengine, but this did not help. We need to be able to save blog posts using Cookies without user registration.
]]>Hi! Your plugin looks great. Please, can do you solve this PHP warning?
Deprecated: Optional parameter $site_id declared before required parameter $all_favorites is implicitly treated as a required parameter in?wp-content/plugins/favorites/app/Helpers.php?on line?108
]]>When using the shortcode in the Meta Slider caption filed, i get errors. I also tried Smart slider and same problem. Thanks for any support.
favorites.min.js?ver=2.3.4:1 Uncaught TypeError: Cannot read properties of undefined (reading ‘posts’)
at a.setButtonData (favorites.min.js?ver=2.3.4:1:12199)
at a.updateAllButtons (favorites.min.js?ver=2.3.4:1:11428)
at HTMLDocument. (favorites.min.js?ver=2.3.4:1:11149)
at HTMLDocument.dispatch (jquery.min.js?ver=3.7.1:2:40035)
at v.handle (jquery.min.js?ver=3.7.1:2:38006)
at Object.trigger (jquery.min.js?ver=3.7.1:2:70124)
at HTMLDocument. (jquery.min.js?ver=3.7.1:2:70726)
at Function.each (jquery.min.js?ver=3.7.1:2:3129)
at e..each (jquery.min.js?ver=3.7.1:2:1594)
at e..trigger (jquery.min.js?ver=3.7.1:2:70701)
Also getting this in the backend. Deprecated: Optional parameter $site_id declared before required parameter $all_favorites is implicitly treated as a required parameter in?/www/daltonwineltd_666/public/wp-content/plugins/favorites/app/Helpers.php?on line?108
]]>We are unable to access wp-admin on https://realestate-in-uruguay.com due to a high amount of admin ajax requests from the favorites plugin. The high usage seems to be particular to the favorites_array and pinpointed to these files:
wp-content/plugins/favorites/assets/js/favorites.js
wp-content/plugins/favorites/app/Events/RegisterPublicEvents.php
Using php 8.2
[24-May-2024 17:48:53 UTC] PHP Fatal error: Uncaught Error: Cannot use a scalar value as an array in public_html/wp-content/plugins/favorites/app/Entities/Favorite/FavoritesArrayFormatter.php:73
Stack trace: 0 public_html/wp-content/plugins/favorites/app/Entities/Favorite/FavoritesArrayFormatter.php(55): Favorites\Entities\Favorite\FavoritesArrayFormatter->resetIndexes() 1 public_html/wp-content/plugins/favorites/app/Entities/User/UserRepository.php(212): Favorites\Entities\Favorite\FavoritesArrayFormatter->format(Array, 893, 1, ‘active’) 2 public_html/wp-content/plugins/favorites/app/Listeners/FavoriteButton.php(46): Favorites\Entities\User\UserRepository->formattedFavorites(893, 1, ‘active’) 3 public_html/wp-content/plugins/favorites/app/Listeners/FavoriteButton.php(12): Favorites\Listeners\FavoriteButton->updateFavorite() 4 public_html/wp-content/plugins/favorites/app/Events/RegisterPublicEvents.php(46): Favorites\Listeners\FavoriteButton->__construct() 5 public_html/wp-includes/class-wp-hook.php(324): Favorites\Events\RegisterPublicEvents->favoriteButton(”) 6 public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 7 public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 8 public_html/wp-admin/admin-ajax.php(207): do_action(‘wp_ajax_nopriv_…’) 9 {main}
thrown in public_html/wp-content/plugins/favorites/app/Entities/Favorite/FavoritesArrayFormatter.php on line 73
]]>In namespace Favorites\Entities\FavoriteList , FavoriteListingPresenter.php, filterMarkup function, $this->html .= apply_filters('the_content', $this->markup);
should be just changed to $this->html .= $this->markup
, or some other way? As the the_content
hook here will apply the rendered content from other places, example page builder, i.e., whole page content generated by page builder will be injected into the markup.
There might be a reason when the_content is used there, but it’s causing redundant/duplicated rendered content when a site uses page builder, and most of page builder use the_content to inject their rendered content.
]]>Is favourite plugin providing apis for display bookmark videos in mobile app ?
]]>Submitted this via your website yesterday, but not sure you received it. Resubmitting here… Installed your plugin in a dev environment. We are having issues with displaying the favorites list for anonymous user. Works fine for logged-in user. WP Engine has added the cookie exclusion. We can see the cookie has the correct items that were favorited. We added the shortcode [user_favorites] to a page and when the page loads we can briefly see the favorites listed but then it changes to “No Favorites” (ajax call it seems). We even tried disabling AJAX in the plugin setting (Cache Enabled on Site) but same behavior.
]]>Can you give us a way so the users can mark woo categories as favorites?
Another question, how do you store favorite posts by user in database?
]]>Hello,
I have the problem that when opening my favorites list, it’s displaying on page render twice and after a few seconds it’s fine and showing up only once.
How can I fix this? What is the reason? What should I change?
]]>I am trying to make this plugin work with the Gutenberg Query Loop Block; when I click (select or unselect) on the icon it applies to ALL posts in the Query Loop.
Can anyone help please?
I use Gutenberg 2024, and I insert the shortcode [favorite_button] in the post?
Is there anything else I should do?
Thank you
]]>Glad to see that this plugin still works.
Only issue I seem to be having is trying to display custom fields in the listings. I can get a value, but it is the ID, not the name.. Anyone have luck with this?
]]>For instance, the “favorites” button is now just showing the word
Favorited and the number of times it was. But it should be a button
there.
And right now it is also making <span style=”text-decoration: underline;”>Favorited</span> the first word of every article. Not good. That looks very unprofessional.
I upgraded to the latest version of WP and every plugin. But it was doing this already with WP version 6.2.4.
Help?
Thank you,
Andre
]]>How can I interpret and maybe fix these errors filling my error.log file?
It fills up rapidly.
[15-Feb-2024 05:37:40 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/user/public_html/wp-content/plugins/favorites/app/Bootstrap.php on line 83
[15-Feb-2024 05:38:40 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/user/public_html/wp-content/plugins/favorites/app/Bootstrap.php on line 83
[15-Feb-2024 05:39:54 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/user/public_html/wp-content/plugins/favorites/app/Bootstrap.php on line 83
[15-Feb-2024 05:40:41 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/user/public_html/wp-content/plugins/favorites/app/Bootstrap.php on line 83
[15-Feb-2024 05:41:54 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/user/public_html/wp-content/plugins/favorites/app/Bootstrap.php on line 83
[15-Feb-2024 05:42:42 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/user/public_html/wp-content/plugins/favorites/app/Bootstrap.php on line 83
etc. etc. etc. …
Kind Regards,
Hey there,
I have a custom URL like the one below:
/profile/?name=SOME
Is there a change to use this plugin to also track the params ?name=SOME
of a page (in my case) or a post (if not possible for a page)?
Thank you.
Has anyone managed to extend this so that a user can share a list of favourited posts as a link, without having to login?
]]>Hi, I was wondering if it was possible to display these favorites in an Elementor Loop Grid.
The documentation is here for the filtering but I can’t seem to figure it out. https://developers.elementor.com/docs/hooks/custom-query-filter/
This is what I added to the snippets.
get_user_favorites($user_id = null, $site_id = null, $filters = null);
function user_favorites( $query ) {
$query->set( 'get_user_favorites' );
}
add_action( 'elementor/query/{$query_id}', 'user_favorites' );
If you have any ideas, please let me know! I know I am not doing something right. Just want to know if its possible. This is a video of something similiar. https://www.youtube.com/watch?v=240n170b_Do
]]>I have an error in my network wordpress. I have 3 sites on my network, the first one without favorites, the other with favorites. And i have some issue
First in the function get_user_favorites_count
Warning: Undefined array key “site_id” in …/favorites/app/Helpers.php on line 96
I fix this
if ( $site_favorites['site_id'] == $site_id && isset($site_favorites['posts']) ) return $site_favorites['posts'];
with
if ( !empty($site_favorites['site_id']) && $site_favorites['site_id'] == $site_id && isset($site_favorites['posts']) ) return $site_favorites['posts'];
And a second issue with the_favorites_button
Warning: Undefined array key “site_id” in /var/www/html/wordpress/toulouse-attractivité-mb/assets/plugins/favorites/app/Helpers.php on line 113
I fix this
if ( $site_favorites['site_id'] !== $site_id ) continue;
with
if ( !empty($site_favorites['site_id']) && $site_favorites['site_id'] !== $site_id ) continue;
This modification fix the warning but trigger an error
Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /var/www/html/wordpress/toulouse-attractivité-mb/assets/plugins/favorites/app/Entities/User/UserRepository.php:189 Stack trace: #0 /var/www/html/wordpress/toulouse-attractivité-mb/assets/plugins/favorites/app/Entities/User/UserRepository.php(189): in_array()
I fix this
if ( in_array($post_id, $favorites) ) return true;
with
if ( is_array( $favorites) && in_array($post_id, $favorites) ) return true;
And after this modification, everything work fine.
Maybe I miss something, a setting to avoid this problem, but if not, maybe it’s should be a good idea to solve this issue
]]>Hello
Is there a way to delete individual favorites from the list instead of all?
Thank you
]]>I am seeing the following fatal error in my error log. Please investigate and fix for the next update.
PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /wp-content/plugins/favorites/app/Entities/Favorite/FavoritesArrayFormatter.php:73
]]>
Hello,
Is it possible to configure Favorites to not show a button for specific posts or pages? To include both single and blogs? I tried some CSS but it doesn’t work on both. Hope you can help or add this feature.
Thank you.
]]>We’re using [user_favorites post_types=”post”]. IT shows favorite posts for a second, and then all posts go invisible and page becomes blank.
]]>Does the plug in work with underscores? I cant find the code I have to insert in my php code
]]>Hi there, I have installed and use the “Favorites” plugin on our site WordPress.
On our site, we have custom posts marked as “Favorites” displayed on the Favorites list page.
WordPress Current version: 6.3.1
PHP version 8.0.25
Favorites version 2.3.3
On both PC/Android/iPhone, the custom posts marked as “favorite” are displayed on the favorite list page as expected.
However, the behavior when a custom post marked as a “favorite” does not exist depends on the medium you are using.
When using a PC or Android: “No article” will be displayed on the Favorites page. This is the expected behavior.
On the other hand,
When using iPhone: The Favorites page shows all custom posts that have been unmarked as “favorites”.
This is not the expected behavior only when using the iPhone.
What should I do to resolve this issue?
Best Regards,
Hiroko
After installation and settings, I cant see any icon on my posts…
]]>While using the plugin, I noticed that the ‘favorites’ script is enqueued and loads on the front end irrespective of whether a user is logged in or not. In certain scenarios, particularly where site performance is a concern or where the ‘favorites’ functionality is only pertinent to logged-in users, it may be beneficial to load this script conditionally.
I propose an enhancement to the plugin where site administrators have the option to dequeue this script for non-logged-in users. This would help in reducing unnecessary script loads for visitors who don’t have the capability or need to use the favorites feature.
Implementing this as an option within the plugin settings would be a great feature for those of us looking to optimize our site loads for different user scenarios.
Looking forward to hearing the community’s and developers’ thoughts on this!
]]>Getting an error of, “Warning: Undefined array key “site_id” in \favorites\app\Helpers.php on line 115″ on my dev server which is running PHP 8.1.6
]]>Hi there,
The plug-ins works great, very advanced but we are missing 1 option; favorite taxonomies instead of only post types, for which we also have pages.
Would that be possible in the near future? I think it’s a great improvement.
Thank you!