How to complete uninstall qTranslate?

Having Problems? Need Help? Post here!

Re: How to complete uninstall qTranslate?

Postby vinha » Tue Jul 21, 2009 9:24 am

We have all the titles on default language. It was something else that went wrong when I tried that query with the database. Any ideas how the query could be improved?

I would also really appreciate if qTranslate had an uninstall option, including removal of all languages but the default. It would be beneficial for so many WordPress users who have realized they need caching plugin or are migrating to different platform.
vinha
 
Posts: 8
Joined: Mon May 11, 2009 12:58 pm

I think any plugin should come with complete uninstall proce

Postby curious67 » Wed Jul 22, 2009 10:04 am

I am worried about this too.

I wonder if qtranslate is the only plugin that can not be unistalled properly. This can be extremely serious if someone has a maior blog which then suffers from some problem, incompatibility, etc.

I think there should be some routine provided, which does the removal of all but one language.

It might be best to run this on a backup, off line as it is quite intrusive and profound change. Afterwards, one would have to change database information in wordpress, to switch over to the new database. During this process the wordpress install should be read-only, write protected (is there a command for that?

Alternatively, one can run it more then once and thus produce databases for a number of languages, if one desires to transform one blog into several blogs.

It should remove both regular code and quicktags. It should not be thrown off by spurious blanks and other irregularities.

It also might want to look into different database fields, as tags can be used in many different positions.

First, do a complete backup of the database.
Then, from the backup database, produce a new database

Ideally it should be automatic.

I also suspect that some people already did this and could provide valuable information.
curious67
 
Posts: 43
Joined: Mon Feb 16, 2009 8:52 am

Re: How to complete uninstall qTranslate?

Postby vinha » Fri Aug 07, 2009 8:32 am

Lots of people are having problems with qTranslate at the moment, so I hope there will be a working solution soon.
vinha
 
Posts: 8
Joined: Mon May 11, 2009 12:58 pm

Re: How to complete uninstall qTranslate?

Postby RavanH » Tue Sep 15, 2009 9:04 pm

vinha wrote:...
#post title
UPDATE wp_posts SET post_title = SUBSTRING(post_title, LOCATE('<!--:en-->', post_title)+10);
UPDATE wp_posts SET post_title = SUBSTRING(post_title, 1, LOCATE('<!--:-->', post_title)-1);
...


Vinha, I tried your queries (only with back-ticks around the table and entry names, which shouldn't make a difference here but just to be sure) and it turned out perfectly ! All these <!--:en--> tags that remained after uninstalling qTranslate and that where messing with wp-dtree javascript in a BAD way, have been rubbed clean from the database... I am happy :)

THANK you!

EDIT: I just noticed some titles missing in my DB too... it seems when a title does NOT have a <!--:en--> tag, it will be erased completely :(
RavanH
 
Posts: 17
Joined: Fri Mar 13, 2009 3:19 am

Re: How to complete uninstall qTranslate?

Postby vinha » Thu Sep 17, 2009 7:28 am

RavanH wrote:Vinha, I tried your queries (only with back-ticks around the table and entry names, which shouldn't make a difference here but just to be sure) and it turned out perfectly ! All these <!--:en--> tags that remained after uninstalling qTranslate and that where messing with wp-dtree javascript in a BAD way, have been rubbed clean from the database... I am happy :)

THANK you!

EDIT: I just noticed some titles missing in my DB too... it seems when a title does NOT have a <!--:en--> tag, it will be erased completely :(

That's nice! I wish I would had figured that title thing out when I played with those queries. So the correct uninstallation routine would be:

1. Uninstall qTranslate plugin
2. Check all post and page titles (make sure they have all the language tags)
3. Make backup
4. Run the database cleaning queries
5. Verify the results
vinha
 
Posts: 8
Joined: Mon May 11, 2009 12:58 pm

Re: How to complete uninstall qTranslate?

Postby cab123 » Sun Jan 24, 2010 7:53 am

Excuse me, I am not programmer. Where and how I should apply these query strings?
cab123
 
Posts: 1
Joined: Sun Jan 24, 2010 7:52 am

Re: How to complete uninstall qTranslate?

Postby furrykef » Mon Feb 15, 2010 11:54 pm

Why has this been an issue for well over a year? Any plugin that can't clean up after itself upon uninstall is fundamentally broken, in my opinion, especially when there is no warning to such an effect.

I just tried the query, BTW, but I lost almost all post titles, even though they were all in English. Although I can restore from backup, I'm really not happy about this, because I have no way to get rid of qTranslate unless I figure this out myself. I shouldn't have to do that.

cab123 wrote:Excuse me, I am not programmer. Where and how I should apply these query strings?


Your Wordpress is running on a MySQL database (or, possibly, some other kind of database, but MySQL is most likely). You need to run the query on that database. Your webhost might have a tool such as phpMyAdmin to help you.

But, as has been said, you'll probably lose a bunch of post titles...
furrykef
 
Posts: 3
Joined: Tue Feb 09, 2010 8:50 pm

Re: How to complete uninstall qTranslate?

Postby guido » Mon Dec 20, 2010 4:13 pm

The following query script is better (it also cleans up wp_posts.post_excerpt and it doesn't destroy data that is not multi lingual):

Code: Select all

UPDATE wp_posts SET post_content = case when LOCATE('<!--:en-->', post_content) > 0 then SUBSTRING(post_content, LOCATE('<!--:en-->', post_content)+10) else post_content end;
UPDATE wp_posts SET post_content = case when LOCATE('<!--:-->', post_content) > 0 then SUBSTRING(post_content, 1, LOCATE('<!--:-->', post_content)-1) else post_content end;

UPDATE wp_posts SET post_title = case when LOCATE('<!--:en-->', post_title) > 0 then SUBSTRING(post_title, LOCATE('<!--:en-->', post_title)+10) else post_title end;
UPDATE wp_posts SET post_title = case when LOCATE('<!--:-->', post_title) > 0 then SUBSTRING(post_title, 1, LOCATE('<!--:-->', post_title)-1) else post_title end;

UPDATE wp_posts SET post_excerpt = case when LOCATE('<!--:en-->', post_excerpt) > 0 then SUBSTRING(post_excerpt, LOCATE('<!--:en-->', post_excerpt)+10) else post_excerpt end;
UPDATE wp_posts SET post_excerpt = case when LOCATE('<!--:-->', post_excerpt) > 0 then SUBSTRING(post_excerpt, 1, LOCATE('<!--:-->', post_excerpt)-1) else post_excerpt end;

UPDATE wp_terms SET name = case when LOCATE('<!--:en-->', name) > 0 then SUBSTRING(name, LOCATE('<!--:en-->', name)+10) else name end;
UPDATE wp_terms SET name = case when LOCATE('<!--:-->', name) > 0 then SUBSTRING(name, 1, LOCATE('<!--:-->', name)-1) else name end;


Yeah this probably can be done more elegantly but this one does the job. I'm not sure if there are more columns that can contain multi lingual data, but the above script seemed to have done the job for me...

What I don't really understand from the above discussion: Is there a way to have qTranslate do this for you, or do you have to do this cleanup manually when you deinstall qTranslate?
guido
 
Posts: 3
Joined: Mon Dec 20, 2010 4:06 pm

Re: How to complete uninstall qTranslate?

Postby guido » Mon Dec 20, 2010 4:47 pm

Just a warning to save anyone else from trouble.

guido wrote:The following query script is better ...


Yeah it's better, but still not perfect: In my case it resulted in mysterious loss of data in the post_content column. For one specific post, only the first half of the stuff between the <!--:en--> and <!--:--> was kept; the second half had disappeared.

The only thing special about the text was that
(1) everything after the first new line had disappeared
(2) the stuff that had disappeared contained <ol> and <li> tags but for the rest no special content.

I haven't been able to find out what exactly went wrong (my db is so small that I fixed it manually).
guido
 
Posts: 3
Joined: Mon Dec 20, 2010 4:06 pm

Re: How to complete uninstall qTranslate?

Postby guido » Mon Dec 20, 2010 4:50 pm

furrykef wrote:Any plugin that can't clean up after itself upon uninstall is fundamentally broken


Completely agree.
guido
 
Posts: 3
Joined: Mon Dec 20, 2010 4:06 pm

PreviousNext

Return to qTranslate Support Forum

Who is online

Users browsing this forum: Google [Bot] and 2 guests