Back to a clean install of 1.5.4.
In config.php i have $config['auto_alias_content'] = true; (that's the default)
In admin console -> Global settings i have Default language for the frontend: "No Default Language selected"
I'm creating a new page in admin console with title Ιστορία, menu text Ιστορία and some content. Now with the above settings when i press the submit button cmsms should take the menu text make it lowercase and put it in the page alias but instead i get error: Alias must be all letters and numbers.
Now when i change the Default language for the frontend to: "Ελληνικά" (Greek)
when i press submit i get no error (The content was successfully added to the database.) but when i edit the page i see that page alias is empty. Page alias didn't make it to database (field content_alias in db is empty).
I think maybe this is a bug.
Now studying the code around the page alias generation i tried various stuff but i didn't manage to fix it (i'm not really a very good php coder) but i bypassed the error by doing the above:
NOTE THIS IS A HACK OK? I DO NOT RECOMMEND IT
In file \lib\classes\class.content.inc.php
1) I commented all content of function SetAlias and i replaced it with $this->mAlias = 'fake';
Code: Select all
function SetAlias($alias)
{
$this->mAlias = 'fake';
}
So this bypasses all SetAlias checks it's WRONG i know.
2)Then in the update function instead of insertng the mAlias into the db i'm inserting the menu text.
Code: Select all
$myalias = $this->mMenuText; //I use menutext as page alias
$myalias = trim($myalias);
$myalias = ereg_replace("/", "-", $myalias);
$myalias = ereg_replace(" ", "-", $myalias);
$dbresult = $db->Execute($query, array(
$this->mName,
$this->mOwner,
strtolower($this->mType),
$this->mTemplateId,
$this->mParentId,
($this->mActive == true ? 1 : 0),
($this->mDefaultContent == true ? 1 : 0),
($this->mShowInMenu == true ? 1 : 0),
($this->mCachable == true ? 1 : 0),
$this->mMenuText,
$myalias, //here it is...
$this->mMetadata,
$this->mTitleAttribute,
$this->mAccessKey,
$this->mTabIndex,
$this->mModifiedDate,
$this->mItemOrder,
$this->mMarkup,
$this->mLastModifiedBy,
$this->mId
));
Some conclusions that i have made is that i think something is not right in function CheckAliasError and SetAlias maybe they are not compatible with utf-8 chars. Hope this gets fixed in the next update. Cheers.