HomeForumsPanoPress SupportDirect Link Access (adding hash to the URL) does not work

This topic contains 13 replies, has 3 voices, and was last updated by  Omer Calev 2 years, 10 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #3110

    fullcgi
    Participant

    Hello Sam,

    thank you for the great plugin you created. I use it for a tour with several positions. It work nice and smooth.

    I got a page where I list all the positions of a single tour with the shortcode using

    pano file=”panoramas/mypano.html” preview=”node1.jpg” button=”on”
    pano file=”panoramas/mypano.html” preview=”node2.jpg” button=”on”
    .
    .
    .

    Works perfect. But when I change the value for file=”” from

    pano file=”panoramas/mypano.html” preview=”node1.jpg” button=”on”

    to

    pano file=”panoramas/mypano.html#node1″ preview=”node1.jpg” button=”on”
    pano file=”panoramas/mypano.html#node2″ preview=”node2.jpg” button=”on”

    to activate direct link access with Panopress, a Javascript error is being displayed when I click the play button.

    ‘Error:TypeErrror: a is undefeined’

    FF 33 Windows.

    Is it not possible to append a hash to the URL of the html file like that? If no, do you have any ideas how to get this done?

    Thanks you for your advice!
    Gerrit

    #3115

    Sam Rohn
    Keymaster

    it should work, try either using absolute URL path, or adding a trailing slash like

    pano file=”http://domain.com/path/panoramas/mypano.html#node1″

    or

    pano file=”panoramas/mypano.html#node1/″

    let us know if it works…

    thanks

    sam

    Sam Rohn :: New York City
    360° Panoramic Photography :: www.samrohn.com
    Location Scout :: www.nylocations.com

    #3125

    fullcgi
    Participant

    Hello Sam,

    thanks for the suggestions. Sorry that it took so long to reply. I forgot to check email notification in this thread.

    Unfortunately, none of the suggestions work. It seems that the plugin adds a trailing ‘/’ to the URL even if it ends with a hash address. Or it adds some invalid character.

    If I put the absolute path + “#node1/” in the browser’s address bar i.e.

    http://domain.com/path/panoramas/mypano.html#node1/

    the Javascript error is identical to the message wp / pano press throws, when putting ‘file=”http://domain.com/path/panoramas/mypano.html#node1″’ in the pp short code.

    Maybe I should dive into the source code of PP and see if I can fix it there.

    Thank you,
    Gerrit

    #3126

    Sam Rohn
    Keymaster

    @omer may have more insight into this one…

    sam

    Sam Rohn :: New York City
    360° Panoramic Photography :: www.samrohn.com
    Location Scout :: www.nylocations.com

    #3127

    Omer Calev
    Keymaster

    Hi Gerrit,

    Try to identify the script generating the error or post a link to a test page.

    Thanks

    Omer

    #3128

    fullcgi
    Participant

    Hi Omer,

    many thanks for the great plugin and for your reply.

    Safari sais this: Error:TypeError: ‘undefined’ is not an object (evaluating ‘a.firstChild’)

    http://gerritschulze.com/panorama-tour-st-andreas-positions

    Thank you,
    Gerrit

    #3135

    Omer Calev
    Keymaster

    Hi Gerrit,

    I think I found the problem, try this quickfix:

    http://www.panopress.org/wp-content/uploads/panopress.1.2.fragment.quickfix.zip

    Instruction: download the zip file, unpack and replace panopress.php with the enclosed file.

    Thanks

    Omer

    #3137

    fullcgi
    Participant

    Hi Omer,

    sorry for the slow reply. But it seems the email notification did not notify me, when you replied.

    Thank you for the quick fix. I replaced panopress.php, but it does not fix the issue (see the link above).

    Thank you,

    Gerrit

    #3138

    fullcgi
    Participant

    After a couple of tests I came up to the conclusion that the ‘#’ sign in the JSON data handed over to panopress.embed() is causing the issue.

    On line #638 I inserted this

    $settings[PP_SETTINGS_FILE] = str_replace ( ‘#’ , json_encode(“#”) , $settings[PP_SETTINGS_FILE] );

    which replaces ‘#’ by ‘\”#\”‘.

    Result: no Javascript error, but panopress.embed() does not understand the “file”:”url” if url contains an escaped hash character like this.

    It would be nice if there would be a parameter in panopress.embed’s params-array to handover the node to the embed code, as the # sign doesn’t seem to work as expected.

    I tried to split the file url in pp_html() into two parts, i.e. html-file and node-address, which works perfect, but I do not know the key name of $params array to handover the node id:

    Could you please advise what the correct key name of the associated array $params is?

    Thank you,

    Gerrit

    #3139

    Omer Calev
    Keymaster

    Hey Gerrit,

    please post link to a page working with the quickfix without modifications.

    Thanks

    Omer

    #3140

    fullcgi
    Participant

    Hi Omer,

    take this one please (I just reverted to the quickfix):

    http://gerritschulze.com/panorama-tour-st-andreas-positions

    Thank you,

    Gerrit

    #3142

    Omer Calev
    Keymaster

    Hi Gerrit,

    One more update, this one for the js/panopress.js file:

    http://www.panopress.org/wp-content/uploads/panopress.js.1.2.fragment.quickfix.zip

    Thanks

    Omer

    #3143

    fullcgi
    Participant

    Hi Omer,

    thank you very, very much. You are great. This fixed the issue:-) Now it works perfect!

    Many thanks for your support and for fixing the issue so quickly.

    Best Regards,

    Gerrit

    #3144

    Omer Calev
    Keymaster

    That’s great!

    I added the fix to the development version so you don’t have to wary about in on the next update.

    Omer

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.