Hi,

A suggested patch (against 6.x-1.1) which allows relative urls.

Thank you.

Comments

hass’s picture

Status: Active » Needs review
hass’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Status: Needs review » Needs work

There is one problem with url(). If you have enabled language specific path prefixes you will have an url like http://example.com/de/piwik.php. In this case users will receive a 404 and cannot solve this themself.

hass’s picture

Status: Needs work » Closed (won't fix)

No feedback and progress for long time. Closing.

bengtan’s picture

Okay.

nterbogt’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new2.04 KB

I would still really like to see this happen. Here is my implementation, could be improved a little on the strpos but that seems to be the fastest way. Open to suggestions.

This method could also support '/piwik/' URLs too if people found them useful. I really need relative to the base_path. i.e. http://example.com/drupal/piwik if my site lives at http://example.com/drupal.

Please let me know, happy to make further changes.

nterbogt’s picture

StatusFileSize
new2.05 KB

Sorry. Note to self: instantiate your variables! :)

hass’s picture

Status: Needs review » Closed (won't fix)

Invalid patch format and i18n will break. There is competly no harm at all to enter the full qualifies url. There is also really no good argument to implement this and to risk a broken module because of broken base path logics.

nterbogt’s picture

I have 3 instatiations of my website in dev, test and production environments. We use an internal apache proxy rewrite rule to pass things through to piwik, and the piwik server changes based on which environment we're running in.

Such a patch would make life easier, so that each time I bring production back to dev or test, I don't need to update the piwik url. Currently, piwik is the only module that would actually require variable modifications between the environments.

Would such a patch be accepted if I fix i18n and use the appropriate patch format?