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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 8:00 – 15:00 | 8:00 – 15:00 | 8:00 – 15:00 | 8:00 – 15:00 | 8:00 – 15:00 | - |
- | 16:00 – 17:00 | 16:00 – 17:00 | 16:00 – 17:00 | 16:00 – 17:00 | 16:00 – 17:00 | - |
Supporter timezone: Europe/Rome (GMT+02:00)
This topic contains 5 replies, has 2 voices.
Last updated by Alejandro 1 year, 10 months ago.
Assisted by: Alejandro.
Author | Posts |
---|---|
June 21, 2022 at 5:48 am | |
daveB-11 |
Media are duplicated multiple times in default language after wpml is enabled. |
June 21, 2022 at 6:35 am | |
June 21, 2022 at 8:44 am #11506303 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
The main issue can be seen here: hidden link as you can see you are using over 90M of memory and only have 40M available plus you need a minimum of 128M (in your case more than that, since you're already using amost 100M) n order to meet our minimum requirements so let's start with that: Please add the following code in your wp-config.php file, right after the database information lines of code: define('WP_MEMORY_LIMIT','256M'); 2) ❌ Before proceeding please make a full website backup! ❌ ------------------------ I don't think that will fix the problem of the images but it will prevent other to duplicate like that. However it also seems you have reset WPML before and that would actually explain why the content is showing duplicated as you see it right now as well, could it be that you did so? However there's a way to fix this if you have access to your database. You can use this query to delete all the duplicated queries: https://wpml.org/forums/topic/image-duplication-2/#post-10188479 In your case, the query would be: DELETE FROM `wpue_posts` WHERE `post_name` LIKE '%-3%' AND `post_type` LIKE 'attachment' and you'd have to run this query a few times changing %-3% with: - %-1% And so on until you see that the query is not being applied to any element anymore. Regards. |
June 21, 2022 at 11:12 am #11508219 | |
daveB-11 |
Still have the same issue I remove images from -1 to -20 but still have duplicate images This we we lost attached images also please have a look at your end actually i have a stage site so you can play with this thanks in advance |
June 21, 2022 at 11:55 am #11508633 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
if you lost attachments tell me that the attachments were the ones that you chose as the "main" image for said attachments and not the actual original image, which at the same time tells me those images existed there before since it's impossible those images are added to content otherwise. However, i see that the duplicated image is not there already so i'm not entirely sure what else i can do here to help you, maybe i'm not understanding your new request? Let me, however explain in detail how the query above i gave you works. When you create an image, WordPress assigns it a slug as it would with a post (because an image is actually a post TYPE for WordPress so they have the same structure). This means that if you have an image that was duplicated 4 times, their slugs would probably look like this: However if you have 2 images that have the same name, they would have a similar slug: original-image (image one called "original image") There is no way to differentiate between the 2 images WordPress doesn't really "look" at the actual image, it only looks at the slugs and the query i sent you would end up deleting that image as well. -------------------- If you see that there are images missing, try to upload them again and if they are not attached to a page, that's only because you attached a duplicate of an image and not the original one. it was removed so it's not attached anymore and in this case you can now attach the original one. Regards. |
June 22, 2022 at 5:17 am #11515755 | |
daveB-11 |
Hi, 1. Images are not duplicated in file directory its showing single time - hidden link Please have a look of all 3 cases & let me know what is the issue we have |
June 22, 2022 at 10:30 am #11518427 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
I couldn't see the images because it seems lightshot is not working correctly, however: 1) It's normal that the images are not duplicated in the file directory because the "duplication" is just a database entry that makes WordPress believe there are images for each language 2) I checked your site and i don't see any duplicated image in one language and since i can't really see the screenshot, i'm a bit lost on what you mean here 3) I'm not sure where you're getting this or how but the images in the database should exist 1 for each language you have, again this is a database entry that allows the image to be available in the translated languages. Regards. |
The topic ‘[Closed] Media is duplicated when WPML is enabled’ is closed to new replies.