Closed (won't fix)
Project:
Pathologic
Version:
6.x-2.0-beta23
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2008 at 11:37 UTC
Updated:
26 Feb 2010 at 17:59 UTC
Fine:
Bad:
As I'm working on a website which has several (non-technical) editors, the error happens from time to time. Can Pathologic parse node URLs with a trailing slash as well?
Thanks.
Comments
Comment #1
Garrett Albright commentedNot efficiently. Sorry.
It looks like what might serve you better is a filter ordered before Pathologic which removes slashes at the end of relative paths. That would probably be something you'd have to hammer together yourself and/or get someone to hammer together for you.
Comment #2
mdupontSo this is "won't fix"? I'll try to use flexifilter to handle this.
Comment #3
Garrett Albright commentedYes. Sorry.
Comment #4
John Hodgins commentedHi, I have the same need on my site, and Pathologic seems the ideal place to do it. I've added the following line at line 180 of the beta-23 version and it seems to work perfectly for me:
$path = rtrim($path, '/');Am I missing some obvious problem?
Great module by the way -- very useful!
Comment #5
Garrett Albright commentedSorry. I know it's a simple "fix," but it's still out of Pathologic's scope. Please either use some other filter to trim off trailing slashes (mdupont suggested Flexifilter above) or train users not to end paths with slashes.
Comment #6
mdupontUpdate: Global Redirect may be the module you need, as it removes trailing slashes and ensures that node/123 paths will always be redirected to aliased paths. Be aware though that there might be issues with multilingual websites (redirecting to the wrong language if the alias is the same). Pathologic + Path Redirect + Global Redirect has been the winning combination for me.
Comment #7
Garrett Albright commentedThanks for the update, mdupont. Could you elaborate a little by telling us what order you have those filters in?