Synchronize/convert all page aliases to URL

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
luk407
Forum Members
Forum Members
Posts: 16
Joined: Mon Nov 15, 2010 11:01 pm

Synchronize/convert all page aliases to URL

Post by luk407 »

I like new feature with custom URL, but is it possible to convert all page aliases to URL with one click?
Flat or hierarchy - depends on settings in "Site admin/Global settings/Content Editing Settings".

Maybe it will be good to add this funcionality in "Content/Pages - select menu" (convert URL of selected pages).
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Synchronize/convert all page aliases to URL

Post by calguy1000 »

Just use phpmyadmin:

for flat URLS:

Code: Select all

UPDATE cms_content set page_url = content_alias where page_url = '';
for deep URLS

Code: Select all

UPDATE cms_content set page_url = hierarchy_path where page_url = '';
of course, backup first.  The upgrade does the first statement if you had use_hierarchy=false in the
config.php priory to upgrading.

However, there's really no need... because if the page_url is not set, the system will compare using the hierarchy path... no problems at all.
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.
luk407
Forum Members
Forum Members
Posts: 16
Joined: Mon Nov 15, 2010 11:01 pm

Re: Synchronize/convert all page aliases to URL

Post by luk407 »

Thank you.
This is the fastest solution.

Just one note - I changed query a little bit:

Code: Select all

UPDATE cms_content set page_url = content_alias where page_url = '' OR page_url IS NULL;
Locked

Return to “[locked] Installation, Setup and Upgrade”