WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Flickr Embed
[resolved] Version 1.1 triggers fatal error (13 posts)

  1. crbarnett
    Member
    Posted 1 year ago #

    Just recently saw this error when trying to activate new plugin version.

    Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/coacht/wstitanbaseball.com/wp/wp-content/plugins/wp-flickr-embed/wp-flickr-embed.php on line 12

    Can you guide for assistance? Thanks for taking a look.

    http://wordpress.org/extend/plugins/wp-flickr-embed/

  2. dash8x
    Member
    Posted 1 year ago #

    I'm getting the same error. I had to delete the plugin folder to deactivate the plugin.

  3. dash8x
    Member
    Posted 1 year ago #

    After investigating the issue I have found out that this is a PHP version problem. The plugin is using PHP namespaces (see http://www.php.net/manual/en/language.namespaces.importing.php) which is only available in PHP 5.3+

    So you will need to update your server to PHP 5.3.x or greater to use this plugin. You can contact support if you are using a hosting account. I was able to change my Hostgator account to PHP 5.3.23 after contacting support and the plugin is working fine.

  4. dash8x
    Member
    Posted 1 year ago #

    I'm getting a another error AJAX error: error (Not Found) on another blog when I try to use the plugin in the visual editor.

  5. dash8x
    Member
    Posted 1 year ago #

    The issue seem to arise when the WordPress Address and the Site Address is different.

  6. hiddentao
    Member
    Plugin Author

    Posted 1 year ago #

    Of coure. Sorry about that. I imported an external Flickr API library which uses namespaces. I'll fix that issue now.

  7. hiddentao
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, version 1.2 is out and should fix both of these issues:

    • No more use of namespaces. PHP 5.2 should be enough.
    • Uses site URL rather than WP URL
  8. dash8x
    Member
    Posted 1 year ago #

    Thanks for the update but I'm still getting the AJAX error: error (Not Found).

    My blog has the WordPress files in their own directory.

    I looked up your code and when I changed the site_url() in the following function to home_url(), it seemed to fix the issue.

    public function getSignRequestApiUrl() {
            return sprintf('%s?%s=', trailingslashit(<strong>home_url()</strong>), self::SIGN_URL_PARAM_NAME);
        }
  9. crbarnett
    Member
    Posted 1 year ago #

    Hey,

    Thanks for the update. I am now seeing a different fatal error after upgrading to 1.2.

    Fatal error: Cannot redeclare class Flickr in /home/coacht/wstitanbaseball.com/wp/wp-content/plugins/wp-flickr-embed/DPZ/Flickr.php on line 27

    My WordPress install is in a sub directory (not root) of my site, but the WP address and Site Address fields are identical.

  10. hiddentao
    Member
    Plugin Author

    Posted 1 year ago #

    @crbarnett There is probably another Flickr class in another plugin somewhere in your WP installation. But don't worry the solution is for me to change this plugin's Flickr class name to something that won't clash.

    @dash8x Thanks for that, I'll make that change. I wish the WP API was simpler! (see http://wordpress.stackexchange.com/questions/20294/whats-the-difference-between-home-url-and-site-url)

  11. hiddentao
    Member
    Plugin Author

    Posted 1 year ago #

    Ok v1.2.1 is out with the fixes previously outlined. Hopefully it's all working for you guys now.

  12. dash8x
    Member
    Posted 1 year ago #

    Thanks, everything is now working fine for me.

  13. hiddentao
    Member
    Plugin Author

    Posted 1 year ago #

    Considering this done.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic