Hello,

My website is stored in a subdirectory like this http://www.website/directory/
When i click on the print icon for a user profile i get this url:
http://www.website/directory/print/directory/user/username
The correct url should be
http://www.website/directory/print/user/username
Does someone knows how to correct it ?

Comments

jbfelix’s picture

The problem is here on line 746 $path = PRINT_PATH .'/'. $path;
Is there an other variable than $path to get the path without the base_url ?

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

That code is perfectly fine.. If you're displaying a user profile, the $path variable there should be 'user/username', and the result of that line would be 'print/user/username'..

Unless of course you called print_insert_link() yourself with the first argument set to 'directory/user/username' in which case you'd get the result you're getting...

Other than that, in my tests I was unable to reproduce your problem, as the links always pointed to 'directory/print/user/username'.

BTW, my test setup always uses sites in a subdirectory, so my tests always cover your case. What I actually never test is sites without a subdirectory.

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No further info in two weeks. Closing the issue.