This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 17 replies, has 2 voices.

Last updated by Ivan 5 years, 4 months ago.

Assigned support staff: Andreas Neuber.

Author Posts
June 5, 2014 at 6:45 am #413513

Ivan

Hi.
I've just closed this topic http://wpml.org/forums/topic/does-wpml-use-base64/ but just after I've found WPML was causing the problem.

As explained in my las post I've found out many of my websites have a huge database size because base64 images inside.
Example: <img alt="" src="data:image/png;base64…

Today I made a new test on a fresh WordPress Install. Installed WPML plugins and found base64 that wasn't there before

This are the steps I followed in order to repeat the issue

Made a fresh WordPress Install.
Create a post and included 1 image using “Add media” button.
Exported database.
NO “base64” code found in database

After install and configure WPML Multilingual CMS, WPML String Translation and WPML Translation Management.
Setup with 2 languages
Created a new post with one image.
NO “base64” code found in database

Edit a page, Translate yourself > Duplicate. Switch to second language, and translated independently.
“base64” code found 4 times in database

included 1 image using “Add media” button to a page
Exported database.
“base64” code found 6 times in database

I would appreciatte if you can give me a solution. Is a real problem having all that base64 code making bigger and bigger my databases.

June 5, 2014 at 7:57 am #413565

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Hello Ivan,

Yes, if I'm informed correctly we do use base64 and it helps us to keep content elements apart.

1) How many MB does your database have?

2) Are you using these latest versions together?
> Sitepress-Multilingual-CMS 3.1.5
> String Translation 2.0.5
> Translation Management 1.9.4
> WPML Media 2.1.4

3) Do you remember the DB tables where you found these records?

I will then contact a developer and ask if what you describe is normal.
Thanks!

June 5, 2014 at 8:14 am #413576

Ivan

Thanks for your quick answer.

I have this problem in at least 5 websites.

In the testing wordpress I'm using the lastest versions of WPML.

BelIow I will give you details of another site, the worst case.

- DB size = 27mb

- Versions
WPML Media Version 2.0.2
WPML Multilingual CMS Version 3.1.5
WPML String Translation Version 2.0.5
WPML Translation Management Version 1.9.4

- tables
base64 code found over 3000 times. Most of the are images and text from editors.

I can provide full database if needed.

Thanks for your help

June 5, 2014 at 9:07 am #413630

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Hello Ivan,

Thanks for the info!
The fact alone that base64 is found in the database should not concern us, but the question if there are many unnecessary records.
I will now involve one of our developers for further feedback on this..

June 5, 2014 at 10:15 am #413690

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Hello Ivan,

Our senor developer gave some feedback..

Most of these records are most likely translation jobs: we hash the data sent to jobs to check if content got changed. This should actually not be a problem.
Of course, if you could tell us on which table you found these records, we could provide a better explanation.

June 5, 2014 at 10:29 am #413702

Ivan

I see lots of images with base64 including code like: data:image/png;base64.
Corresponds to images added as featured images and within editor.
As I told you I've found more than 3000 base64 codes in database.

Please let me know how to send you the whole database so you can analize it. Must be in private of course.

June 5, 2014 at 11:05 am #413740

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Hello Ivan,

Ok, lets do that - I would recommend to use hidden link
My email is: [REMOVED BY SUPPORTER]

Thanks in advance.

June 5, 2014 at 11:21 am #413764

Ivan

I sent you the database. Find the images by searching data:image/png (founded 10 times). And more than 3000 times just base64 only text (not so important since not increasing that much the database).

The goal would be get rid of base64 images in database, or at leas prevent for new addings in the future.

Thanks

June 6, 2014 at 5:30 am #414244

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Hello Ivan,

I'm afraid the notification email of Wetransfer has not reached me (yet).

As alternative, could you provide me with limited FTP credentials via the protected webform below, upload the dump file on your webspace and I simply download it then?

June 6, 2014 at 6:00 am #414255

Ivan

I sent you an email with download link for database.

June 6, 2014 at 6:24 am #414262

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Thanks! Received the file..

What SQL query did you use to find the 3000+ records?

June 9, 2014 at 2:30 pm #415631

Ivan

As I told you I've found more than 3000 base64 codes in database.
I see lots of images with base64 including code like: data:image/png;base64.
Corresponds to images added as featured images and within editor.

June 10, 2014 at 6:01 am #415921

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Correct - there are altogether 10 DB records with this string.

Since I have some difficulties finding them..
What method did you use to find the other 2900+ records containing base64?
In which tables did you find them?

--
internal note: wp_posts -> ID 3330 --> 5 MB

June 10, 2014 at 6:58 am #415942

Ivan

In order to find other 2900+ just search of "base64". In many tables.

June 10, 2014 at 8:01 am #415990

Andreas Neuber
Supporter

Languages: English (English ) German (Deutsch )

Thanks a lot!
Now I found it, sorry, was thinking to complicate :-/

# Screenshot
Very most of the occurrences originate from "wp_icl_translate" + "wp_icl_translation_status".

Why do we use it?
Translation jobs are send to translators. Translators may start translate, but the original document could be changed by the author at the same time.
In order to detect any changes (also in non-european languages) our plugin uses base64 strings.

I order to have such a very important functionality a certain amount of extra data cannot be avoided. Considering that we have 8,500 records for posts with 8.5 MB data I think that 4.2 MB for the complete table "wp_icl_translate" is still in order.

# Post ID 3330 - "TOP 10 CITY ATRACTIONS IN BARCELONA"
This one record in table "wp_posts" contains data with over 4MB. And there is indeed a base64 string with an enormous length. Doesn't look right.

Could you please find this post and switch to "Edit" in the "Text" mode?
Do you see there also this long base64 string?