[Plugin: Private Feed Keys] Feed keys not being generated
-
I’ve been trying to generate a private feed key for my blog with your plugin, but I haven’t been able to for some reason. I suspected that there may be issues with the WP version I was using, but I’ve tried multiple WP versions at this point with no luck. When looking at the XML for the feed, it seems that a key of some sort has been generated, however, the key does not appear in the “User Profile” page. Any suggestions as to what I may be doing wrong (I do have “More Privacy Options” installed)?
Here is the feed’s XML code if it helps:
[Code moderated as per the Forum Rules. Please use the pastebin]
-
I’m also having this problem – exact same situation, but I don’t see any sort of key being generated in the XML. Help!
Hello alekarsovski, nearlyjen,
There shouldn’t be any change to the feed XML. The keys only should show up in the feed URL when browsing the blog and logged in. Additionally, the key will only be added to the feed URL if the blog is private, since if the blog is publicly visible then the feed can be loaded normally without a per-user key.
Hope this helps,
AdamThanks, Adam. What about the issue with the feed keys not showing up in the User Profile? Any ideas?
I was running into this problem because I thought it would work if I went to http://www.example.com/feed
But that doesn’t call the filter that generates the key. You need something that will invoke get_feed_link(). So for my case i just put the meta box in my sidebar. That has a link to my feed and that is generated by invoking get_feed_link() which calls the filter and adds the key to it.
I’m still not seeing it on my profile but its working.
Hi nerlyjen, Colin,
I’m not sure why the keys aren’t showing up in your user profile. The plugin uses
add_action('show_user_profile', 'private_feed_keys_edit_user_profile');as documented here to add a block of HTML to the end of every profile screen. It should at least give you a Private Feed Keys heading on the profile.
We’re running WordPress 3.2.1 at the moment. What version are you having problems with?
Best,
AdamAdd me to the list as well. I am running 3.3.1. I have More Privacy Options installed and it is functioning correctly. I have “Blog Privacy” set to “Blog network can be viewed by registered users of this community only.” Your plugin is installed and activated on the Network Plugins menu. On each user’s profile, under the “Private Key Feeds” section it says “You have no Feed Keys in use.” However, I have visited every user’s site. I have logged out and back in as a test subscriber and that hasn’t worked. Is there any other information I can give you or that you’d like me to try that might lead to a solution?
Thanks for your help and time!
@the_oilman, feed keys will only be listed in the user’s profile if they have been accessed at least once. The list is built with the follow query:
SELECT * FROM ".$wpdb->base_prefix."private_feed_keys WHERE user_id = %d AND num_access > 0 ORDER BY last_accessTo see Keys in a user’s profile, log in as that user, copy the feed URL that contains the key, log out and go to the feed URL or open the feed URL in another browser, then look at their profile.
@adam, no matter what user I log in as, the keys do not show up in the list. I have visited all sites with numerous users, and none of them “gather” keys. When you say “copy the feed URL that contains the key,” I assume that would be from the list at the bottom of the user profile, right? Or perhaps there is something else I should be looking for? Thanks again for your time.
Snow storm. No power. Will check on this soon, thanks 🙂
Here is a screen-cast that goes over what to expect with PrivateFeedKeys:
https://www.youtube.com/watch?v=PHCyCR9N6CUHopefully this explains what the plugin does better and clears up your issue. Don’t hesitate if you have further questions, but I’m hoping this will help get us on parallel tracks.
Hi, I have a similar problem. The Feed Key is generated but accessing the site with it is not possible. When I’m logged in the source code displays:
http://de.konmedia.info/feed/?FEED_KEY=06e9f29125f9ef99dea52bf6f9f305a66d359ae4When not logged in the site redirects me to the login page… more privacy options and private feed keys is activated on network level…
Can you provide support for this please?
Thank you!WordPress Version 3.3.2
@kwekkeboom, without more information I don’t know what might be going on and why you are being redirected to the login page. I’m running 3.3.2 and the plugin works fine. My one thought is that maybe you are running another authentication plugin that has a “lower” priority (so that it executes earlier) than Private-Feed-Keys and therefor is redirecting to the login page before Private-Feed-Keys gets a chance to authenticate.
One thing you could try to do is change the priorities on lines 31 and 34 of the PFK source from 9 to something smaller:
// Authentication actions add_action('wp_authenticate', 'private_feed_keys_authenticate', 9, 2); // private blog plugin checks authentication in template_redirect, so be sure to // authenticate before it. add_action('template_redirect', 'private_feed_keys_authenticate', 9, 2);The other thing you could do is add a debugging line in
private_feed_keys_authenticate()to just ensure that function is being executed before the redirect happens.@kwekkeboom, without more information I don’t know what might be going on and why you are being redirected to the login page. I’m running 3.3.2 and the plugin works fine. My one thought is that maybe you are running another authentication plugin that has a “lower” priority (so that it executes earlier) than Private-Feed-Keys and therefor is redirecting to the login page before Private-Feed-Keys gets a chance to authenticate.
One thing you could try to do is change the priorities on lines 31 and 34 of the PFK source from 9 to something smaller:
// Authentication actions add_action('wp_authenticate', 'private_feed_keys_authenticate', 9, 2); // private blog plugin checks authentication in template_redirect, so be sure to // authenticate before it. add_action('template_redirect', 'private_feed_keys_authenticate', 9, 2);The other thing you could do is add a debugging line in
private_feed_keys_authenticate()to just ensure that function is being executed before the redirect happens.Hi Adam,
thank you for you quick reply.
I think we found the source of the problem.
The new version of the “more privacy options” plugin has a change in the source code which isn’t mentioned in the chengelog:In 3.2.1.5 all if-clauses in the end of the php file look like this:
if (( ‘-1’ == $current_blog->public ) || ($number == ‘-1’)) { // add exclusion of main blog if desired
// add_action(‘template_redirect’, array(&$ds_more_privacy_options, ‘ds_users_authenticator’));
add_action(‘send_headers’, array(&$ds_more_privacy_options, ‘ds_users_authenticator’));
add_action(‘login_form’, array(&$ds_more_privacy_options, ‘registered_users_login_message’));
add_filter(‘privacy_on_link_title’, array(&$ds_more_privacy_options, ‘registered_users_header_title’));
add_filter(‘privacy_on_link_text’, array(&$ds_more_privacy_options, ‘registered_users_header_link’) );as send_headers is used for the redirect now (instead of template_redirect in version 3.2.1.1) the function to use the private feed key is triggered after the redirect ans so no feed is present and the first if results in false.
This should be true for alle other users of your plugin as soon as they update more privacy options.
Do you see any solution to keep the two plugins compatible?Huge success. Reverting the “IF” statements mentioned by kwekkeboom, alone did not make the feed for me. Before I watched the video, the site was set to
I would like my blog to be visible only to registered users of Spiders Web
But it seems to only work with,
I would like my blog to be visible only to registered users I add to "Coders"great work.
The topic ‘[Plugin: Private Feed Keys] Feed keys not being generated’ is closed to new replies.