While developing an IPN solution for PayPalCart (not yet released), I stumbled across a problem when using ShortURLs. Apparently, when using submitting relative URLs (for, example, the PayPalCart thankyou page in the PayPal form variable set), ShortURLs (almost every deployment I've seen) truncates out the site baseurl, leaving only a relative URL for PayPal to return customers to.
Well, my PayPalCart thankyou page isn't on PayPal, it's on MY site.
Sooooo...
To utilize ShortURLs with PayPalCart (other modules will, of course, be affected similarly), a change needs to be made to the ShortURLs function that translates the URLs. The baseurl, in effect, needs to be added back in, or retained.
Where original Out var:
'"$1+$2.phtml"'
Change it to:
'"'.$base_url.'$1+$2.phtml"'
Do that for all of the Out vars to fix the issue.
More notes posted in MirageLab Forums
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 05:05 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
FIX: ShortURLs breaks [PayPalCart]
-
**unknown user**
- Rank: Expert
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 1193
Ohh... cool. I hadn't thought of that issue. (Another of my "bugs" that demonstrates that all of the short URL implementations are derivative of Simple URLs. :) )
I've always considered that relative URL's is better. Other than this rather specialized situation, is there any reason for not using relative? -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Jun 26, 2009
- Posts: 64
InvalidResponse
..shouldn't the baseurl be added to the return URL in the paypal form?
The URL generated for the return URL in the paypal form starts off with the baseurl attached, but running it through the ShortURLs translator strips it off.
- Moderated by:
- Support
