Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Vakantie Ameland

    (@christianebuddy)

    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??

    Plugin Author John Eckman

    (@johneckman)

    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 https://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?

    Thread Starter Vakantie Ameland

    (@christianebuddy)

    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…..

    Plugin Author John Eckman

    (@johneckman)

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

    In other words, https://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.

    Thread Starter Vakantie Ameland

    (@christianebuddy)

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

    Plugin Author John Eckman

    (@johneckman)

    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WPBook] Extra "e" adde in links on app page??’ is closed to new replies.