Problem with aliases in Joomla 2.5 for greek language

Started by dski, 19 November 2013, 09:19:04

Previous topic - Next topic
A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

dski

Hi!

I use the Alexandria Library component (version 2.0.4) under Joomla 2.5 and I came across the following problem:

I tried to insert two books using the greek language (book title in greek). The first book was inserted with no problem. When I tried to insert the second one (in the same category) I got an error that there is already a book with the same alias in the same category. After some trials I found out that the problem lies with the greek language in the book title.When all characters are greek it seems that the component (or the Joomla?) generates an empty alias, so when I tried to insert a second book in greek characters the new alias was also empty and there appeared to be a conflict. With the latin characters there is no problem, the aliases are generated properly. The solution was to insert a latin character alias myself but this is not very practical when you have many book to insert. Please also note that this problem appears only with books. With categories or authors with names in greek language the aliases are generated with no problem.

Thanks for your time!

Dimitris

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

federica

Hi Dimitris,
try to insert the same titles in two joomla articles, the aliases are generated correctly?

Can you post some titles in the greek language? I would use them for debug.
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

dski

Hi Federica!

Sorry for my delayed response.

In the Joomla articles the aliases are generated correctly when we use greek characters (I've tested this several times with new articles). The problem seems to appear only with Alexandria Library :-(

Here are some greek book titles to use for debugging:

Η Φόνισσα
Ιστορία του Ευρωπαϊκού Πνεύματος
Ματιές στην Κοινωνία
Λωξάντρα

Thank you again for your time!

federica

You're right!

Open the file administrator/components/com_abook/tables/book.php and add this code before the last parenthesis "}"

        public function check()
        {       
                if (trim($this->title) == '')
                {
                        $this->setError(JText::_('COM_CONTENT_WARNING_PROVIDE_VALID_NAME'));
                        return false;
                }
       
                if (trim($this->alias) == '')
                {
                        $this->alias = $this->title;
                }
               
                $this->alias = JApplication::stringURLSafe($this->alias);
               
                if (trim(str_replace('-', '', $this->alias)) == '')
                {
                        $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
                }
               
                return true;
        }
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

dski

Hello Federica!

Thank you once more for your help. I added the code to book.php and now it works fine!

Dimitris

dski

  Hello Federica,

  Here I am again after quite some time.  The library project was somehow on hold but now I got back to it and face some problems I would like to report.

  I tried to insert some books using a .csv file. My efforts were successful when my data are written in english (latin). However it seems that there are still some problems when using the greek language. When I try to insert a greek title for a book through the .csv file I get the error:

COM_CONTENT_WARNING_PROVIDE_VALID_NAME

which is the same I got when I tried to insert a greek book title through the normal library interface (this problem was resolved by you, see the previous posts in this topic).

  Moreover, when I use a title written in latin and include e.c. a description of the book in greek, the book is inserted correctly but the description is not there!

  It would be useful to be able to insert at least titles in greek language through the .csv file. If you want a test try the titles:

Η Φόνισσα
Ιστορία του Ευρωπαϊκού Πνεύματος
Ματιές στην Κοινωνία
Λωξάντρα

  Thanks for all your support!

federica

Hi dski,
I tried to insert a book from csv file without errors. If you try to insert the attached file do you get any error? Rename it to .csv.
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]