-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new tag created with wrong slug #366
Comments
Comment by johnclause Do you use QTranslate-Slug? |
Comment by picasso No... It's another plugin? I use qtranslate-x only |
Comment by floopyzicer Than that plugin is not compatible with q-translate-x On Thu, Apr 28, 2016 at 3:17 PM, Dmitry notifications@github.com wrote:
|
Comment by picasso I do not use QTranslate-Slug |
Comment by johnclause Is this only happening for custom types? Which plugin do you use to manage custom types? |
Comment by picasso I have not tried this with a regular post... I will try it today. |
Comment by johnclause Hi Dmitry, could you test if your problem solved here: https://github.com/qTranslate-Team/qtranslate-x/archive/stable.zip ? |
Comment by picasso Hi John, I've tried it with a regular post - the same result, a new tag created with a wrong slug. |
Comment by johnclause Link I gave you is the latest updated https://github.com/qTranslate-Team/qtranslate-x/blob/stable/qtranslate.php#L6 You probably looked in readme https://github.com/qTranslate-Team/qtranslate-x/blob/stable/readme.txt#L7, which I have not finalized yet. The changes made which should target your problem is qTranslate-Team/qtranslate-x@ad28ac4 ;-) |
Comment by picasso Ok, I've tried this 3.4.6.8 |
Comment by johnclause Are you sure? Did you do deactivation/activation? I cannot reproduce it anymore. You may need some clean up on older tags. Did you try a brand new tag and post? |
Comment by johnclause Hi Dmitry, would you have time to test it deeper soon enough? I want to release 3.4.6.8, but I wish to make sure that you are ok first. I cannot reproduce the problem anymore by the steps you listed. Am I doing something else than you do? Could you think of a better way for me to reproduce if the problem is indeed still there? Thanks a lot. |
Comment by picasso Hi John, sorry, I was away from my computer for 2 days... What I found out:
I'm glad that with new tags it works, but what should I do with my old tags? |
Comment by johnclause Wow, sorry about this. I guess, the easy way would be to fix it in db. I assume you know how to edit database, right? Fix table wp_terms first. Edit names and slugs as you wish them to be. Names should be in the default language without any "[]", same way as they would be without qtx. Then copy content of option 'qtranslate_term_name' into a text file to be able to edit it. It is a hash with keys to be the term name and value is a hash of "xx" => "name translation". Make sure the keys are the same as names in wp_terms table. I assume you know how to edit hashes in db? The tricky part is to adjust the length if you change some string. If you think it is too complex, send me .sql file with wp_terms and value of option 'qtranslate_term_name' via qtranslateteam at gm ail d c om. I will try to fix id and may come up with some cleaning script, as I assume some other people would have this problem too. Interesting that you are the only one so far to notice this trouble. I guess, people do not use tags much, or do not translate them. |
Comment by picasso Hi John, I've sent you a mail with .sql files. |
Comment by johnclause Hi, Dmitry, we are working on an option to clean up term translations, as it seems to be a problem inherited from old qt-. Now WordPress did so many changes, that old way, qt- was dealing with term translations, is totally obsolete now and needs to be re-designed anyway. Does this issue hold you from going ahead with your development? Your db file shows just a few broken tags, which you may edit manually in a normal way at /wp-admin/term.php page and it should correct the problem from now on. Is that right? |
Comment by picasso Hi John, no, this issue does not hold me. I just found out that I need regularly check the terms after my editors made some changes in the posts. I takes 5-10 minutes to clean up after them. But certainly I prefer to resolve this problem in the future and forget about it. Could you give me some clues how manually correct my old tags? Just "Edit Tag" and then press "Update"? |
Comment by johnclause Yes, I think just making sure that all the values, including slug, are correct at term.php and pressing "Update" should fix database entry. All ids and relationship with posts are staying the same this way, only tags names and slug get adjusted in a correct way. I did not try though. What does that do for you? You should use LSB mode at term.php. Raw Editor Mode is discovered broken at term.php and we are working on fixing it too. |
Comment by johnclause Hi Dmitry, could you please test https://github.com/qTranslate-Team/qtranslate-x/archive/stable.zip as much as you can? This should be a fix for your issue, as well as editing of tags in Raw Editor Mode, etc. It should even allow you now to add a new tag on Apply database operation "Clean Legacy Term Names" from page Please, try really hard to break it for a few days and let me know if you find problems. Thank you very much. |
Comment by johnclause I have published pre-release with that version: https://github.com/qTranslate-Team/qtranslate-x/releases/tag/3.4.6.9 |
Comment by picasso Hi John, |
Comment by johnclause Any news? |
Comment by johnclause I hope you are ok, Dmitry, are you? Have you gotten a chance to test at least a little bit? |
Comment by picasso Sorry. I'm ok now... I've tried operation "Clean Legacy Term Names" and after that I get the following log: Error: Term "layout" (id=509) cannot be loaded. Error message: Legacy term names have been cleaned up: .....and so on... It's strange how it was modified (or maybe it's only wrong way to write in the log)... So I restored the database from backup. |
Comment by picasso But then I found out that tag names do not change when I switch the language even after restore the database. |
Comment by johnclause Yeah, the "Clean Legacy Term Names" did not seem to work ... I did not have a way to really test it. Did you try to do anything else besides "Clean Legacy Term Names" before you gave up? That operation was not the main point of the update at all, but it is for you ... I am sorry. Anyway we'll take a look why it did not work. Thanks a lot for the testing! |
Comment by picasso My default language is English. My first language in the list is also English. |
Comment by johnclause Hi Dmitry, we cannot find what is wrong. The only explanation would be that you call some filters in your other code which we remove during the run of "Clean Legacy Term Names". Unfortunately, we do not have a good testing case and you will probably be the only user of this code in the nearest future. This makes it hard for us to test and puts a pressure on you ;) Please help us to resolve this. We altered the code a bit to allow filters, but still not sure if that was a real cause. In order to save your time on db recovery in case it is still not working right, please, after you dowload the latest stable branch, https://github.com/qTranslate-Team/qtranslate-x/archive/stable.zip, comment/uncomment the following lines of code in "qtranslate-x/admin/qtx_admin_utils_db.php" before running operation "Clean Legacy Term Names". Comment lines:
which will prevent saving the result of the operation into the database. The report will still be generated. Make sure to enable WP_DEBUG - change or add line as "define('WP_DEBUG', true);" in This will record additional debugging information in file Only the default language of all the terms have to be saved in db field
where "Burgundy" is the term name in the default language. Please, if the things go wrong again, troubleshoot it and let us know what needs to be fixed. I think that with that additional debugging output, the troubleshooting should not be difficult, I am sure you can do it quickly enough. If all goes well, then continue testing all operations you normally do with terms like creation from different pages, alternation of them and so on. The whole term framework was changed comparing to the version you currently use. That is why the testing of all the operations is important - that is what I meant to test when I asked if you tested all the rest ;) Thank you very much for your help. I hope it will take a bit quicker than a few weeks for you this time ;) We would like to release the new version in a few days. I think you are the best case to test it all and I would not release it until you say that all is ok for you. A few other testers already reported "no problem". Please, I hope you can help us. Thanks a lot. |
Comment by johnclause Any news? |
Comment by johnclause Dmitry, how is it going? |
Issue by picasso
Thursday Mar 24, 2016 at 10:08 GMT
Originally opened as qTranslate-Team/qtranslate-x#366
The problem is the following:
I have tags which are linked to post with custom type (in my case 'movie').
For example tag with Name
[:en]Barolo[:ru]Бароло[:]
and with Slug in English
barolo
When I change something in my post with this tag (the content for example) and then update it
Could you check it? It's very annoying to re-check all tags and delete/relink them...
The text was updated successfully, but these errors were encountered: