Forum Replies Created

Viewing 15 replies - 61 through 75 (of 228 total)
  • Thread Starter Jer Clarke

    (@jeremyclarke)

    Thanks Dylan! OMG I can’t believe I didn’t find it! Perfect.

    Found the solution. It seems the link was doomed to fail because it wasn’t updated to create the nonce that the ga_do_reset() function then checks.

    The matching link in ga_filter_plugin_actions(), which controls the “Settings” and “Reset” links on the Plugins screen, does it this way:

    wp_nonce_url( admin_url('options-general.php?page=ga_reset'), 'ga-reset' )

    Updating ga_options_page() to do it the same way worked for me:

    <?php
       /**
         * JERHACK: wrap bare call to admin_url in wp_nonce_url() to match the check in ga_do_reset()
        * @see https://www.ads-software.com/support/topic/cant-deauthorize-reset-google-analyticator?replies=12#post-7412763
         */
        ?>
        <!--<a href="<?php echo admin_url('/options-general.php?page=ga_reset'); ?>">-->
        <a href="<?php echo wp_nonce_url( admin_url('options-general.php?page=ga_reset'), 'ga-reset' );?>">

    You can see I wrap the old URL in an HTML comment and add the new one with wp_nonce_url() instead.

    Developers please apply this fix to the plugin ASAP! Getting stuck unable to reset is a terrible problem.

    This is a terrible bug! Please fix it whoever is in charge!

    To summarise: It seems that for pretty much everyone (adding myself) the ” Deauthorize & Reset Google Analyticator.” button at the bottom of the settings page doesn’t work. Instead it always shows the generic “Are you sure you want to do this?” error.

    That error is caused by a failed “nonce” which are the security keys used to ensure that a page is requested by the appropriate other page and not by an attacker.

    Specifically, in this case, it happens during a call to check_admin_referer() in ga_do_reset() in google-analyticator.php:

    // Check to make sure referer is same as host.
    	check_admin_referer( 'ga-reset' );

    It seems using the button from the bottom of the settings page doesn’t fulfill the nonce needs of ga_do_reset().

    For whatever reason the “reset” button on the global plugins listing page DOES work, so we can use it as a fallback, and it shouldn’t be too hard to figure out what that button is doing that the one on the settings page isn’t.

    IMHO still very functional. On a simple setup it gives the desired results.

    Thread Starter Jer Clarke

    (@jeremyclarke)

    Hi Super Powered, thanks for replying.

    I know about map_content already though, and I don’t think it will help. What I need is a way to show only a specific “post type” using the shortcode because I want a map of all pages but not posts.

    map_content=’global’ shows both posts+pages, ‘contextual’ doesn’t give a way to show all pages and ‘single’ won’t help either.

    Thread Starter Jer Clarke

    (@jeremyclarke)

    In case it helps, here is the function I ultimately created that solves my particular problem (that my RSS feed is invalidated if I have a “URL” property that includes Unicode symbols in the filename):

    function gv_rawurlencode_url_filename($url) {
    	/**
    	 * Extract only the filename from the URL (encoding other parts messes up URL structure)
    	 */
    	$url_parts = parse_url($url);
    	$url_pathinfo = pathinfo($url_parts['path']);
    	$url_filename = $url_pathinfo['filename'];
    
    	/**
    	 * Encode the filename to avoid Unicode errors
    	 */
    	$filtered_filename = rawurlencode($url_filename);
    
    	/**
    	 * If encoding changed the filename repace it in the $url
    	 */
    	if ($url_filename !== $filtered_filename) :
    		$url = str_replace($url_filename, $filtered_filename, $url);
    	endif;
    
    	return $url;
    }
    Thread Starter Jer Clarke

    (@jeremyclarke)

    Thanks for replying and considering my ideas ??

    I guess it is a niche plugin but I’m so glad I found it. Will be extremely useful in converting our sad old MediaWiki into WP based documentation. (FWIW MediaWiki also choked on shortcode formatting ??

    Thread Starter Jer Clarke

    (@jeremyclarke)

    This remains an incredibly important feature for sites with more than one author. Any opinions from Disqus or the developers?

    Forum: Plugins
    In reply to: [Analyticator] Beta 6.4.8.1

    Hi there, i’m not sure what’s happening but looking at this new version there are several fixes from other threads that still aren’t present. For me it’s not worth testing if I still need to re-apply all my patches from a year ago.

    https://www.ads-software.com/support/topic/allow-user-override-of-google_analyticator_clientid-and-friends?replies=1

    – They are still hardcoded at the top of google-analyticator.php, is there another solution you added?

    https://www.ads-software.com/support/topic/analyticsfiletypes-is-undefined-error-easy-fix?replies=6

    – Still no check for is_preview in ga_external_tracking_js()

    Thank you for fixing these problems in the next version.

    Thread Starter Jer Clarke

    (@jeremyclarke)

    Thanks!

    FWIW I researched this and it’s very hard to do so because checking the height of the image is slow for the server.

    Have you tried setting both height and width explicitly to the size of your featured image?

    The author is automatically subscribed, so you don’t have to worry about that.

    They have a “code snippet” for auto-subscribing a user group:

    https://editflow.org/extend/auto-subscribe-user-groups-for-notifications/

    Agreed. I think the Pinterest version is clearly wrong and makes no sense at all, but in their defence Facebook is setting a terrible example by disregarding THEIR OWN STANDARD and telling you to do something that should make a correct implementation throw an error.

    IMHO what FB needs to do is have a special property like profile:facebook_id or something that you put on a profile page and which is used for the sharing preview/promotion whatever else the “article:author” value is currently being used for.

    I don’t know what any of us can do about it, other than bow to the whims of Big Blue (I don’t think that’s IBM any more). FWIW using a full name like that makes the debugger throw errors but your posts still look the same when shared as if there was nothing in the field.

    Hey Herve! Thanks for replying. Of course no one should EVER edit the JetPack plugin of all things, since it’s updated constantly and extremely dependent on external services who’s APIs will change regularly.

    About the article:profile property, the thing is that on the actual Open Graph Protocol site’s section about article (unlike on the Facebook Developers page) it states that the “article:author” property should be a “Profile” type object (or an array of them):

    https://ogp.me/#type_article

    • article:authorprofile array
      Writers of the article.

    Where “profile” links to the profile type definition below.

    This seems to clearly indicate that the correct method is to have URLs on your site with a set of “profile:*” properties for each author, then use those URLs as the article:author properties on your articles. Thus to implement it according to the protocol JetPack would link to the user page of the post’s author from article:author.

    Of course despite this being logical and quite elegant, Facebook directly contradicts it in their Open Graph guidelines by telling you to link to a Facebook profile instead. Presumably their explanation would be that an individual’s FB profile IS an Open Graph “profile”, and that they implement the “profile:*” properties as outlined in the guidelines, but that’s not a good solution at all for an app (i.e. our WP sites) that wants to be a service-independent Open Graph citizen (with users who refuse to join Facebook). In any event clearly Pinterest is not able/willing to use a Facebook profile as a generic source of “profile:*” data, since they ignore facebook URLs completely.

    The question is whether Facebook and/or Pinterest would honor a correct implementation of the protocol (by going to a WP user archive and fetching the profile:* data there), or whether it would be ignored or cause errors.

    IMHO the official Open Graph way is the correct one and solves the actual problem of making the data service-independent. If it works then that’s what JetPack should implement by default, and if it doesn’t maybe Automattic can throw some influence at the problem and get FB/Pinterest to clean up their implementations ??

    LOL Hi Richard,

    Seems like this is a hot mess, since Pinterest tells you to just put your full name in the field.

    Does Jetpack implement the profile:* properties? It seems that’s what the protocol really expects:

    https://ogp.me/#type_profile

    I haven’t tried it yet, but maybe if your article:author URL itself had profile:username set to a valid Facebook username then they would honor that while other sites like Pinterest could pull the first_name/last_name down. Probably not though, I have little faith in these companies and their self-selected standards.

Viewing 15 replies - 61 through 75 (of 228 total)