My nightmare of a FAQ move/upgrade...

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

glue
Posts: 29
Joined: Fri Oct 29, 2004 2:45 pm

My nightmare of a FAQ move/upgrade...

Post by glue »

I wanted to test phpmyfaq RC4. So I installed it on a separate webserver I have (which will be its future location too).

I tried to install it then import my data backed from version 1.4.4, but it said "This does not seem to be a backup of phpmyfaq." So I tried to install the 1.4.8 version. Same problem...

I made a search in the forum and found out I met that problem for firefox users... I changed the admin/backup.import.php file with the trick written in the post viewtopic.php?t=1455

But now when I try to import the database into 1.4.8, I have a lot of errors : "failed (Reason: Table 'My_database_name.Table_name' doesn't exist)"

The database name and prefix both changed from backup version to new one. I noticed that my sql server at the new location has tables named My_new_prefixTable_name ; I had no prefix in the previous location. So I changed by hand all the table names in the backup file, adding the prefix everywhere.

Then it accepted to import the file!

Next I upgraded the faq to 1.5.0 RC4. Wow! What did I do wrong? Isn't there an easier way to move (with database/prefix changes) and upgrade a faq?

Moreover, the display of the categories is broken. See the picture, the subcategories are listed in a weird manner: Généralités, Signes spéciaux ? ~ -, Algo and Escaper are all subcategories of Classement. See picture from previous version and new one (with default style). Moreover, the english section has no subcategories listed in new version...

Image Image

Is it due to the way I upgraded the faq or is this a bug in version 1.5.0 ?

glue
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

sorry for your upgrade nightmare! :(

I'll have to add some more documentation for the upgrade from 1.4 to 1.5.

The problem with the categories is a CSS problem and I'm working on it.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
glue
Posts: 29
Joined: Fri Oct 29, 2004 2:45 pm

Post by glue »

Thorsten wrote:sorry for your upgrade nightmare! :(
Hehe... No problem, it was mainly to help in case someone would meet the same problems.

Keep up the good work! I still enjoy phpmyfaq a lot :)
Thorsten wrote: The problem with the categories is a CSS problem and I'm working on it.
The first problem may be a CSS problem. But what about the English subcategories that disappeared... "English" appears with no subcategories in the "Show all categories" section and in the "Existing Categories" of admin pages too.
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

sorry, I didn't saw that. Is it possible to get a dump of your database from you?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
glue
Posts: 29
Joined: Fri Oct 29, 2004 2:45 pm

Post by glue »

Sure, where do I send it?
Btw, do you want the database saved before the move/upgrade too?

From the "Administration of Records" pages, the subcategories of my "English" section seem to exist.

Another thing, I tried to search in those "Administration of Records" pages but got the following error:
error wrote: Notice: Undefined offset: 4 in .../admin/record.show.php on line 106

Notice: Undefined offset: 3 in .../admin/record.show.php on line 106

Notice: Undefined offset: 2 in .../admin/record.show.php on line 106
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

do the english entries got language tag "en"?

In 1.5 the languages are completely seperated.

You can send the mail to thorsten AT phpmyfaq DOT de

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
glue
Posts: 29
Joined: Fri Oct 29, 2004 2:45 pm

Post by glue »

ooooops

Oh yes, that's it! So, problem solved... Sorry !

I'll have to give a try to this new feature.
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

okay, one step further to the final release. :-)

Thanks a lot for testing!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
glue
Posts: 29
Joined: Fri Oct 29, 2004 2:45 pm

Post by glue »

Thorsten wrote: Thanks a lot for testing!
Welcome.

Btw, I'm testing the new behaviour of multi-languages...

1) How can one set a category in several languages? If I have a record in several languages, I wish the parents categories to share the same languages too in order to have the record displayed in the category lists of those languages.

2) Is there an option to display records that are available in foreign languages even if there is no translation in the user default language? I fear that with so many languages available, most users will only see an empty place...

3) If there is no translation available in that language, why not having a "submit translation" link in case the user wants to contribute ?
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
1) How can one set a category in several languages? If I have a record in several languages, I wish the parents categories to share the same languages too in order to have the record displayed in the category lists of those languages.
Take e.g. a English category, edit it and save it as French with the French title and it should work.
2) Is there an option to display records that are available in foreign languages even if there is no translation in the user default language? I fear that with so many languages available, most users will only see an empty place...
If you wrote the article as described for categories, they articles have the same ID and a different language code and then a dropdown box should appear to switch to the different language of a article.
3) If there is no translation available in that language, why not having a "submit translation" link in case the user wants to contribute ?
wow, this is great idea. I added it on my todo list!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
glue
Posts: 29
Joined: Fri Oct 29, 2004 2:45 pm

Post by glue »

Re...
Thorsten wrote:Take e.g. a English category, edit it and save it as French with the French title and it should work.
I tried it but it seems to just move the category from english to french... it's no longer displayed in the english pages.

I edited it from the "Category Adminstration" pages, using the rename tool. Is there another way I'm not aware of?
Thorsten wrote:
2) Is there an option to display records that are available in foreign languages even if there is no translation in the user default language? I fear that with so many languages available, most users will only see an empty place...
If you wrote the article as described for categories, they articles have the same ID and a different language code and then a dropdown box should appear to switch to the different language of a article.
Yes that switch language box is nice.

But my problem is different... let's say I have records in french and english (with same ids). But now a german user logs into the faq, he will see no data. He will only see "Keine Rubriken gefunden!" So how to allow the german user seeing the records? Do I have to set all my categories in all the available languages (sounds exhausting)?

One more question, if I have a record with several translations available, all the translations are displayed when I select its category. Why not just displaying, if it is available, the user default language? As long as there is that switch language box, he will still be able to see the other languages if needed.
At least the display should make it more obvious which questions are related, they currently look like separate records.

If there is no translation of that record in the user default language, then yes, I think it should mention that there are other translations existing.


Thanks for having added the "submit translation" suggestion!

glue
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you're right. I'm thinking of a fallback function to the default language the admin has set if no article is found in the users language. What do you think?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
glue
Posts: 29
Joined: Fri Oct 29, 2004 2:45 pm

Post by glue »

I've think about it a little bit...

I think the best would be to let the admin sort all the languages in the database settings.

How would it work?
Then... when a user enters the faq, display the record in:
  • the user default language if a translation of the record in this language exists,
  • else, parse the sorted list until you find an existing translation for that record and use it
Display the existing categories lists in the same manner (in the user language if it is available or parse the list sorted by the admin).

Why so?
A global default language setting would not be enough. Consider a faq written in english by the admin, then a german user ads a record in german ; this new record will not be available in the global default language (at least for a while) but should still be viewable by users.

If that german record is also translated in french, what to display?
Let's consider that the faq has the following list sorted by admin: "english, chinese, french, german, ..." So my answer is, french for french user, german for german one, and for other users, as there are no english and no chinese versions, use the french one.

Display suggestion:
For now, a record that is available in several languages is displayed several times. This makes the faq harder to navigate, especialy when many languages are available.
I suggest to display each record id only once in the language suggested above, but followed by the list of available languages in brackets with links to the translations. See the example below for a record available in french and english (same id), with english as top sorted language:
Sample with current version wrote:
  • My question in english [en]
  • Ma question en français [fr]
Suggested display wrote:For french users... (with en linking to "My question in english")
  • Ma question en français [fr] [en]
For english and all other users... (with fr linking to "Ma question en français")
  • My question in english [en] [fr]
Hope this helps and is not too long... :oops:
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

this is really a nice idea. But this will be a major change, that's something for 1.5.+ and 1.6. I hope, you can live with that until the next releases.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
glue
Posts: 29
Joined: Fri Oct 29, 2004 2:45 pm

Post by glue »

I'm happy that you like it. And yes, of course I can wait to see it coded, the important point is that phpmyfaq gets better in the long run :-)

Just one more thing, you didn't answer on the "save category in several languages" point... I didn't manage to do it. I edited it from the "Category Adminstration" pages, using the rename tool. When I tried it, it just moved the category from a language to another, and it was no longer available on the previous language pages :-( Is there another way to edit category?
Post Reply