WordPress.org

Ready to get started?Download WordPress

Forums

WPBook
[resolved] Extra "e" adde in links on app page?? (7 posts)

  1. Vakantie Ameland
    Member
    Posted 2 years ago #

    Using wpbook to publish the site on facebook. This is the URL Seekjobs

    The strange thing is the appname seekjob is correct and the link giving access is https://apps.facebook.com/seekjob/ but the other links on the page have an extra "e" added like this: /seekjobe/ That's why all the sublinks do not work (with seekjob they do work). Why is this happening and how to resolve this, how to get the annoying "e" removed?? (Nowhere in the configuration seekjobe is defined)

    http://wordpress.org/extend/plugins/wpbook/

  2. Vakantie Ameland
    Member
    Posted 2 years ago #

    An extra addition: When I e.g. change the App Namespace to seek-jobs https://apps.facebook.com/seek-jobs/ the same thing happens. All the urls of the pages in the topmenu are ../seek-jobse/ while the app is accessible with the right url: https://apps.facebook.com/seek-jobs/. Again the extra "e" is added. Why is this happening and how to resolve this??

  3. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm. I suspect the extra "e" is coming from the end of https://seekjobsfor.me/

    Somewhere an assumption is being made about the length of a string that's off by one character - the question is, where in the code, and what string.

    When I visit http://apps.facebook.com/seekjob/ the links look correct to me - did you change something recently?

    Is the error only present when browsing Facebook in HTTPS mode?

  4. Vakantie Ameland
    Member
    Posted 2 years ago #

    Well John, thanks for checking. I use HTTPS only access in FB and then the error occurs. When I disable HTTPS in FB and access the app url in HTTP the annoying "e" is gone.

    What is the logic.....

  5. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    OK, so the error happens when browsing in HTTPS mode.

    In other words, http://apps.facebook.com/seekjob/ works fine, but https://apps.facebook.com/seekjob/ is where it fails.

    In the Facebook settings for your app, what have you defined as what they now call the Canvas URL and secure Canvas URL?

    In your WordPress settings, what is defined as the Site Address or WordPress address? (in General section)

    I would say you should have:

    In the WPBook code, in the wpbook.php file, there are functions called fb_filter_postlink, fb_filter_postlink_no_qs, and wpbook_always_filter_postlink, starting around line 1001.

    These functions all use get_option('home') to determine the home url of the blog (in wordpress) and then try to figure out the right url for an https link - maybe if you change what you have defined in WordPress as your site's home page you'd get a better result?

    I think what's happening is that the functions are being too "greedy" and are picking up the "e" from seekjobsfor.me and adding it to the links for your pages.

    The other solution (rather than changing your blog's home page link, would be to edit the three functions I pointed to above to add another offset++ before the offset is used?

    Offhand I can't tell if the problem is the offset is one too high or one too low - it's been a long time since I was in the details of these functions.

  6. Vakantie Ameland
    Member
    Posted 2 years ago #

    Canvas URL and Secure Canvas URL are correct. I changed the WordPress Home URL's to HTTPS and now it's working fine! Tnx

  7. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    Good - glad to hear it.

    I need to look at how we're handling http/https overall anyway, and overhaul that whole section to be less dependent on counting string offsets. ;)

    But at least it will work as you are for now

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags