-
- 1,613 Posts
When i duplicate a resource then i don't get a message the alias already exists.
Rev 2.2.0-pl2 traditional
Evolution user, I like the back-end speed and simplicity
In my case, a new default installation of 2.2.4, the alias is automatically created from the page title specified when duplicating a resource.
-
- 483 Posts
As a matter of normal practice for myself... I duplicate resources a lot. I can confirm in 2.1+, the system automatically creates a new alias for the duplicate. The new alias is based on the new title. This behavior has continued into 2.2.4, as well.
However: The setting 'automatic_alias' in System Settings may affect this behavior if it is set to 'No' in previous versions. In 2.2.4, this setting does not affect duplicated documents.
-
- 1,613 Posts
i think because the alias was blank and some titles where the same it gave some problems.
i played arround with some settings, somehow the client had a couple of documents with the same alias name, that shouldn't be possible.
Evolution user, I like the back-end speed and simplicity
-
- 483 Posts
I have found that blank aliases really screw with things. Behavior that I have noticed with blank aliases includes: False Path URLs being generated, the inability to correctly find child Resources, Inability to navigate to certain specific Resources (I haven't nailed this one down).
Same alias may occur if the documents have different path hierarchy. That is: container1/child is not the same as container2/child. Additionally, Content Type of the document may affect this. Ex: the alias for a CSS document is not the same as one for an HTML document (unless they are both containers).
If you are more worried about how they got there, there are a couple of ways to create duplicate aliases. Anything that uses php outside of the ModX Manager to modify or create the document may do so. Also, direct import to the tables via SQL script may do so as well. Self-made front-end editors can adjust this behavior.
-
- 1,613 Posts
Yea some weird things where going on, what i noticed was when saving a resource front-end there didn't happen a thing, after changing the alias into a unique one it worked again. It shouldn't be possible to have a blank alias or have the same alias as an other resource, if can't be fixed by settings then Modx must have a look at it.
Weird i didn't wrote anything before about this in the forum.
Evolution user, I like the back-end speed and simplicity
-
- 24,544 Posts
Here's a utility snippet to find your empty aliases:
<?php
/* EmptyAliases snippet */
$output = '<h3>Resources with empty aliases</h3>';
$resources = $modx->getCollection('modResource', array('alias'=>''));
foreach($resources as $res) {
$output .= $res->get('pagetitle');
}
return $output;
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
-
- 137 Posts
Quote from: BobRay at Jul 20, 2012, 07:59 AMHere's a utility snippet to find your empty aliases:
<!--?php
/* EmptyAliases snippet */
$output = '<h3-->Resources with empty aliases';
$resources = $modx->getCollection('modResource', array('alias'=>''));
foreach($resources as $res) {
$output .= $res->get('pagetitle');
}
return $output;
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone: http://bobsguides.com/modx.html
Is it possible to use Auto Generate Alias with MODX 2.2.0pl2?
<a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>
Is there some reason why you don't upgrade that site? It is vulnerable to security attacks.
That said, check the System Settings, in the Friendly URLs section. You should find the setting to do that there, if it is available in that version. I don't believe that it was enabled by default until around version 2.3 somewhere.
-
- 137 Posts
Quote from: sottwell at Oct 20, 2015, 06:58 PMIs there some reason why you don't upgrade that site? It is vulnerable to security attacks.
That said, check the System Settings, in the Friendly URLs section. You should find the setting to do that there, if it is available in that version. I don't believe that it was enabled by default until around version 2.3 somewhere.
I have problem with PHP version on my shared hosting, becaus ei have a lot of other old websites that use old version of PHP, even if i switch to PHP 5.3 and more, my provider doe snot support PDO connection. That I am stuck to old version
<a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>