WordPress.org

Support

Support » Plugins and Hacks » Facebook Photo Fetcher » [Resolved] yntax error, unrecognized expression

[Resolved] yntax error, unrecognized expression

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author justin_k

    @justin_k

    You have numerous other javascript errors on your page; these other errors need to be fixed before the plugin can be expected to work reliably. See FAQ12.

    I have the same issue. For some reason the plugin adds a full url after the rel= instead of just adding the number for the album. This is how it worked in the first version of the facebook photo fetcher plugin, so I changed all the occurrences url to the number for the album like this: rel="10151222247755185"

    You will also have to remove the <!--FBGallery2 10151222247755185 --><!--/FBGallery2--> magic tags as well to prevent it from updating and replacing all your changes with the original code it generated.

    Once I realized this worked properly, I went in to the plugin code and found the line causing the issue. It is in the _output_gallery.php file on line 258.

    Change this:

    $link = '<a rel="' . htmlspecialchars($album->link) . '" class="fbPhoto" href="'.$photo->source . '" title="'.$caption_with_br.' " ><img src="' . $photo->picture . '" alt="" /></a>';

    To this:

    $link = '<a rel="' . $aid . '" class="fbPhoto" href="'.$photo->source . '" title="'.$caption_with_br.' " ><img src="' . $photo->picture . '" alt="" /></a>';

    Plugin Author justin_k

    @justin_k

    >>For some reason the plugin adds a full url after the rel= instead of just adding the number for the album

    Because just putting a number isn’t HTML5 valid, and most users prefer a plugin that generates code which properly validates. You can hack the code as above, but this will break html5 validation. I’d also mention that having a full URL *absolutely* does not cause the plugin to break in and of itself, so if it isn’t working for you as-shipped, your error is elsewhere. If it were me I’d be looking for the true cause, rather than hacking the plugin…

    Thanks for the suggestion. I will search for the root cause, but for now I needed something that just works right away.

    If I’m not mistaken, this is how the older version of the plugin worked. I checked for any conflicts and I am not getting any errors except for the one benbowler listed above.

    Plugin Author justin_k

    @justin_k

    Yes, this is how the older one worked (the older one was implemented before HTML5 was widespread). It should work that way, but again it will break html5 validation.

    Plugin Author justin_k

    @justin_k

    It’s probably a conflicting version of Fancybox that’s doing it. Older versions had a bug that caused this not to work, and the newest versions are no longer GPL-compatible, so I shipped a version with FPF in which I made a few minor fixes. If you have another plugin that’s including an older version of Fancybox, that’s probably what’s causing it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] yntax error, unrecognized expression’ is closed to new replies.
Skip to toolbar