Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore APR code doesn't work
- This topic has 22 replies, 3 voices, and was last updated 10 years, 7 months ago by wzp.
-
AuthorPosts
-
January 3, 2014 at 8:41 pm #10350erickresMember
I have read all previous posts and watch the tutorial video, but still having problem.
In this page:
[http://marten.arvixe.com/~erickres/testvid/]
I have this code:
[wp_eStore_APR expiry=0 status=unexpired]
Now you see me!
[/wp_eStore_APR]
I have added a product with the digital product url as: [aprtp://marten.arvixe.com/~erickres/testvid/]
No matter what I do, I cannot see the hidden content.
January 3, 2014 at 9:55 pm #60098wzpModeratorCould you please enable the debug logs, try your test again, and then post the content of the download_manager_debug.log file?
Now, if you’d also checkout this thread:
You’ll see in my posts, that WP was automagically adding a trailing slash to the permalink. I’ll bet the product URI in your eStore database does not have a trailing slash.
I’m pretty sure this is the problem, because every time I enter a URL for your site without a trailing slash, your site automagially adds one.
January 3, 2014 at 11:40 pm #60099erickresMemberI actually did try with and without the ‘/’, I wasn’t sure what I should do, but it didn’t work in any case.
So should it be “aprtp://marten.arvixe.com/~erickres/testvid/” or “aprtp://marten.arvixe.com/~erickres/testvid”?
I will get the debug logs and post it soon.
Thanks
January 3, 2014 at 11:42 pm #60100wzpModeratorBecause you had setup the permalinks on WP to add the trailing slash, the APRTP URI should have the trailing slash as well.
January 4, 2014 at 12:00 am #60101wzpModeratorOkay, I think I see the problem…
[01/03/2014 11:47 PM] – Status : Dispatching APRTP URL = [http://marten.arvixe.com/%7Eerickres/testvid/]
[01/03/2014 11:47 PM] – Status : Authenticating APR request for: [http://marten.arvixe.com/~erickres/testvid/]
[01/03/2014 11:47 PM] – Status : $_COOKIE[1b2b79c29b70a2f3c1a5da283914075d] not found.
When the APRTP link is dispatched, the tilde “~” is translated into a “%7E” which of course is correct.
But when the APR shortcode is invoked, the tilde is not converted into a “%7E” which when run through the validation will not match the original cookie.
Please try renaming the permalink to something without the tilde, reset the logs, and try the test again.
January 4, 2014 at 12:07 am #60102erickresMemberI cannot get rid of the ‘~’ at this point.
I am building a new site for a domain that is currently being used. So I have to use this temp address which I get from the hosting supplier.
The part “http://marten.arvixe.com/~erickres/” is a given to me.
This is only temporary, but I do want to test it all before running live. Any other options you think of?
January 4, 2014 at 12:21 am #60103wzpModeratorThe APR mechanism is meant to be RFC-1738 compliant. That is why the tilde in your product URI is converted into a “%7E” encoded character.
Some newer browsers however, follow the more relaxed RFC-2396, which says it’s okay to not encode tildes. So, when one of these browsers returns the URL back to eStore, the tilde is unencoded; thereby causing the cookie mismatch issue.
I could adjust the code, but it might cause eStore to become browser dependent.
January 4, 2014 at 12:25 am #60104erickresMemberI understand the problem. I am just looking for a temporary solution for my testing before going live.
Do you think some kind of “short link” should work?
When you say you can adjust the code, is it something simple that can be implemented just temporary and be reverted back before going live? Is it a piece of code that I can get from you and modify one of the files?
January 4, 2014 at 12:27 am #60105wzpModeratorThat will not work, because the “Authorizing APR request for:” URL creates a unique cookie. When the shortcode is invoked, the “Authenticating APR request for:” URL must ***EXACTLY*** match the URL previously authorized.
January 4, 2014 at 12:28 am #60106wzpModeratorThat’s what makes the system so secure, LOL.
January 4, 2014 at 12:30 am #60107erickresMemberSo any thoughts about a temporary code adjustments?
January 4, 2014 at 12:31 am #60108wzpModeratorNo promises, but I will look into a “running with scissors” hack you can try.
January 4, 2014 at 12:34 am #60109erickresMemberThanks!
I have another wordpress empty site that I’ve used to experiment on, it has a proper domain name. I guess that another option would be to install the eStore there and test this function there, then copy the page to the current site. I would prefer to avoid this if possible.
January 4, 2014 at 12:47 am #60110wzpModeratorThe licensing for eStore allows this.
January 4, 2014 at 12:48 am #60111erickresMemberWell, I will do it just to do some testing, not permanently.
But I’d wait for your fix first.
-
AuthorPosts
- You must be logged in to reply to this topic.