Page Paths URL Won't Update Properly1 user found helpful
I'm not sure what the default path was that it created, but I have since tried to change it many times. For some reason it won't let me keep the word 'before' in the page.
The current path is 'after-photos' and I'm trying to update it to 'before-after-photos'. After I update the path, if I look at the page properties the Canonical URL remains the same (after-photos).
Has anyone ever experienced this before?
Just to be clear, it's only the word 'before' that it's not accepting. If I try to update it to something else, for example 'after-photos-new', it saves the new path correctly without any issues.
Hopefully I can get some insight into what's going on. Thanks!
concrete5 uses a library called urlify to get rid of special characters and certain words in the URL. ü becomes u (should be ue for lots of people by the way), "an" is removed and so is "before".
You can have a quick look at this file:https://github.com/jbroadway/urlify/blob/master/URLify.php...
Search for before and you'll understand where the file is removed.
What can you do in this case:
* You can use the on_page_urlify event, in an add-on you'd have to build, to intercept calls to urlify and call something else. Keep in mind that this is only available in 5.6.1 with this pull request:https://github.com/concrete5/concrete5/pull/877...
* You can override the URLify library in your site and remove the words like "before" you want to keep in the page path.
Hope this helps!
I'm gonna go the route of overriding the URLify library. Appreciate the help!
I tried overriding the urlify.php file like so:
1. Created the file [site root]/libraries/3rdparty/urlify.php
2. Pasted the original code into the urlify.php file, deleted 'before' from the remove list
I tried clearing my cache, but I'm still unable to add 'before' the url path.
Have I done this correctly?
Here's the code I edited:
As you can see I'm simply removed the word 'before' so that it is no longer listed in the urlify.php file. Still having the same troubles. Just can't get 'before' to be a part of my pages path, even after clearing my cache.
Where through the dashboard can I find this?