WordPress.org

Support

Support » Plugins and Hacks » Sharing Post link broken with 1.3.0

Sharing Post link broken with 1.3.0

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Synved
    Member

    @synved

    It seems there’s a small issue in the new URL code. Given you don’t seem to be using single post links, I think selecting the “Use Full URL” option should temporarily take care of this.

    mike@lilyrx.com
    Member

    @mikelilyrxcom

    That doesn’t seem to do it.

    I have tried “Share Full URL” option and I have also tried the “Display Sharing Buttons” to try and show the sharing buttons IN the post, along with the ones that I am embedding using PHP, and the URLs on both of them seem to still be wrong.

    Thanks,
    Mike

    Plugin Author Synved
    Member

    @synved

    Ok given that I already had a few extra changes that required a release I put the fix for the URL bug above and pushed a new release. Could you try update to 1.3.1 and see if that fixes it? If you go the the Dashboard -> Updates page it should prompt you with the available update.

    By the way remember to uncheck the “Share Full URL” option.

    mike@lilyrx.com
    Member

    @mikelilyrxcom

    Thanks for the very quick update. It seems that the update fixed it when in my wordpress address (http://lilyspharmacy.com/wordpress) …but when using my site address (http://lilyspharmacy.com/blog), the “in-post share buttons” and my PHP added share buttons are both still showing the incorrect http://lilyspharmacy.com/blog/blog link.

    Again – awesome quick-turn on the changes, but it still doesn’t seem to have addressed it on my site address.

    Thanks,
    Mike

    Plugin Author Synved
    Member

    @synved

    But is that /blog a WordPress site at all? Looking at the code it looks like some kind of custom template rather than a WordPress site.

    mike@lilyrx.com
    Member

    @mikelilyrxcom

    The /blog site is my template, using PHP and “The Loop” to embed blog postings into my site template. The loop code that I am using is as follows:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', false);
    require('../wordpress/wp-blog-header.php');
    ?>
    <?php
    $query = '';
    $offset=0;
    
    if (isset($_GET['offset'])){$offset=$_GET['offset'];}				
    
    if (!isset($_GET['p'])){
       $args = array(
    	'posts_per_page'  => 10,
    	'offset'          => $offset,
    	'category'        => '',
    	'orderby'         => 'post_date',
    	'order'           => 'DESC',
    	'include'         => '',
    	'exclude'         => '',
    	'meta_key'        => '',
    	'meta_value'      => '',
    	'post_type'       => 'post',
    	'post_mime_type'  => '',
    	'post_parent'     => '',
    	'post_status'     => 'publish',
    	'suppress_filters' => true );
    
    $posts = get_posts($args);
    }
    else{
            $posts = array(get_post($_GET['p']));
            if ($posts[0]==null){
    	        $posts = get_posts($args);
            }
    }
    
    foreach ($posts as $post) : start_wp(); ?>
    
    <div class="post_title"><?php the_title(); ?></div>
    <div class="post_date"><?php the_time(get_option('date_format')); ?> by <?php the_author(); ?></div>
    <div class="post_content"><?php the_content(); ?></div>
    
    <div class="post_social"><?php echo "Get Social with this Lily's Blog Entry:&nbsp;"; echo synved_social_share_markup(null,null,array('size'=>18)); ?></div>
    
    <?php
     endforeach;
    ?>
    Plugin Author Synved
    Member

    @synved

    Unfortunately WordPress doesn’t really support that, which is why it doesn’t work.

    WordPress expects for permalinks to be the same so you can’t share posts across sites with different URLs. If you were to output the_permalink() in your template, the same way you do the_title(), then it would also output the incorrect link.

    mike@lilyrx.com
    Member

    @mikelilyrxcom

    I do believe WordPress supports this – I got most of the code from wordpress online help.

    You will notice that when I output the_permalink() in my PHP loop, I do get the correct permalink. Notice on the http://lilyspharmacy.com/blog page, I have output the permalink right under the_title. Seems to be just right.

    Also, before the 1.3.0 version of social feather, it seemed to use the correct permalink in the share link, no problem…only after this upgrade have I seen the problem.

    Finally, you will also notice that the share permalink is incorrect in both the social feather icons that I am adding with the echo synved_social_share_markup(null,null,array('size'=>18)); and in the icons that are automatically added to the end of the each blog entry.

    Is there any way I can go back to version before 1.3.0?

    Plugin Author Synved
    Member

    @synved

    Ok I can see that you are using the Loop incorrectly. Try changing your get_posts call to:

    query_posts($args);

    and foreach loop to something like this:

    while (have_posts()) : the_post();
    endwhile;

    Taken from the WordPress documentation. Further reading:
    http://codex.wordpress.org/The_Loop#Multiple_Loops

    By the way, if you really really want to, you can get older versions from the Developers page:
    http://wordpress.org/plugins/social-media-feather/developers/

    I highly discourage using old versions though, as those are NOT supported in any way.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Sharing Post link broken with 1.3.0’ is closed to new replies.