[Solved - see Calguy's post] I have just upgraded to 1.11.6
During testing I noticed some urls suddenly were broken.
What I have discovered is that previously (1.10.3) if you choose a menu name like Fred - Children the page alias was auto set to
Fred---Children. But now, if you choose that menu title the alias it is set to Fred-Children, which is much tidier.
The problem is that if you edit a prexisting page which has the alias Fred---children, say to correct a typo, then it is re-saved as Fred-children. I cannot manually force it to save the original alias.
I am dealing with a site where there are hundreds of pages which have this menu style, so the issue has huge potential. I thought that if I had to change a page I would then run a link checker to see where other links to the page were then broken; the site is heavily cross linked. But I realise that as soon as I correct a page, that page's alias is also changed, causing a spiralling increase in the number of errors.
Is there any remote chance of stopping this feature on this site?
[Solved] Hyphen in file alias
-
- Forum Members
- Posts: 247
- Joined: Sun Oct 28, 2007 4:14 am
[Solved] Hyphen in file alias
Last edited by Andrew Prior on Tue May 07, 2013 12:26 am, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Hyphen in file alias
Though CMSMS shouldn't be re-changing an alias after one exists, you can remove this cleanup code.
in lib/misc.functions.php in the function munge_string_to_url look for this code:
for( $i = 0; $i < 5; $i++ ) {
$tmp = str_replace('--','-',$alias);
if( $tmp == $alias ) break;
$alias = $tmp;
}
in lib/misc.functions.php in the function munge_string_to_url look for this code:
for( $i = 0; $i < 5; $i++ ) {
$tmp = str_replace('--','-',$alias);
if( $tmp == $alias ) break;
$alias = $tmp;
}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Hyphen in file alias
Hope the moderators don't delete your post because of suggesting core modifications. 

-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Hyphen in file alias
Call it 'executive privilege' 

Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
- Forum Members
- Posts: 247
- Joined: Sun Oct 28, 2007 4:14 am
Re: Hyphen in file alias
Calguy, thanks so much.
I rather suspect you might have already done this, but should I put in a bug report.? Andrew
ps. Just tested. It works.
I rather suspect you might have already done this, but should I put in a bug report.? Andrew
ps. Just tested. It works.