View Issue Details

IDProjectCategoryView StatusLast Update
0005075OXID eShop (all versions)4. ------ eShop Core -------public2023-11-17 17:34
Reportermpienkny Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Summary0005075: oxUtilsUrl->processUrl() returns unusable URL
DescriptionIf any URL for GET request is processed by this function parameters are separated by "&" and not by "&" as HTTP requires it!

This happens if URL is used programmatically and not in Smarty.

This problem is originally from function oxUtilsUrl->appendUrl()
Steps To ReproduceCall in php:

echo oxUtilsUrl::getInstance()->processUrl(oxConfig::getInstance()->getShopUrl(), true, array( 'p1' => 1, 'p2' => 2, 'p3' => 3 ));
Additional InformationprocessUrl is used e.g. in oxConfig->getShopCurrentUrl() and many other places
TagsNo tags attached.
ThemeNot defined
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Activities

tadas

2013-04-18 14:34

reporter   ~0008629

Reminder sent to: mpienkny

What is meant by this : "&" and not by "&" ?

As another note, processUrl is meant for forming urls for HTML code, hence it does not remove & if that's the issue. If you want to form urls with &, processUrl function will not help.

mpienkny

2013-04-18 14:39

reporter   ~0008630

I try cheat the ticket system - I wrote (without spaces)
" & a m p ; " a n d n o t b y " & " ?


Okay, and how could I get the Shop home url ?

tadas

2013-04-18 14:46

reporter   ~0008631

yeah, noticed it as plain html in mail, that it was indeed correct, just html displays it this way.

Shop home url can be retrieved by calling getShopCurrentUrl, like you mentioned it. It builds it from shop url defined in config and adds index.php at the end. It doesnt use any extra parameters. You might consider looking into redirect usages, if you need to go to a certain formed url. It should even work with processUrl processed urls.