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 22 replies, has 3 voices.

Last updated by Lauren 5 months ago.

Assigned support staff: Lauren.

Author Posts
March 25, 2019 at 6:36 pm #3457263

joostv-20

Hi Bobby,

Unfortunately I still need a bit of assistance. When I press the "create missing translations" button in Woocommerce->Woocommerce multilangual->status tab to start the install, I get the following error: Fatal error: Uncaught InvalidArgumentException: element_id and type do not match for element_id:4546 the database contains post_attachment while this function was called with post_page in /home/husky2/domains/huskyhoreca.nl/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:32 Stack trace: #0 /home/husky2/domains/huskyhoreca.nl/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1489): WPML_Set_Language->set('4546', 'post_page', NULL, 'en', NULL, true) #1 /home/husky2/domains/huskyhoreca.nl/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php(1846): SitePress->set_element_language_details('4546', 'post_page', NULL, 'en') #2 /home/husky2/domains/huskyhoreca.nl/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php(1816): TranslationManagement->add_missing_language_to_post(Object(stdClass)) #3 /home/husky2/do in /home/husky2/domains/huskyhoreca.nl/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 32

I've deactivated and deleted all plugins related to this, but I still didn't manage to fix it. Can you please help me?

Kind regards,

Joost

March 25, 2019 at 6:39 pm #3457363

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi Joost,

If possible i would like to take a closer look as there might be some fields missing in the database tables for WPML

**Before we proceed I recommend to please take FULL BACKUP of your database and your website.**
I often use the Duplicator plugin for this purpose See: http://wordpress.org/plugins/duplicator/

I would like to request temporary access (wp-admin and FTP) to your site

You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you will enter is private which means only you and I can see and have access to it.

March 26, 2019 at 5:44 pm #3465241

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for the access details !

When you say you Reset WPML , how did you do this ?

the reason the issue was happening was due to this ": element_id and type do not match for element_id:4546 the database contains post_attachment while this function was called with post_page in "

the element id needs to be changed to call the correct function.

to do this i will need to take a closer look at your WPML database tables

please install plugin adminer ari and update me here once ready as i currently cannot install it (i get error "cannot create directory")

March 27, 2019 at 2:36 pm #3472051

joostv-20

Hi Bobby,

For resetting WPML, I went to WPML->Support_>Troubleshooting. Here I pressed on reset at the bottom of the page. After that I also cleared the cache by pressing the button on the top of the page.

I wanted to install the plugin Ari Adminer, but I got the same message. I suggest I have to change the permission files in the map wp-content back to 777 in order to install the plugin?

Kind regards,

Joost

March 27, 2019 at 11:41 pm #3476175

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Well RESETING WPML this way removes all the previous work you have done , didnt you have to start from the beginning ? this should usually resolve such issues for the element id

are you still experiencing this issue ? or any other issue that might be related to this ?

March 29, 2019 at 3:26 pm #3492633

joostv-20

Hello Bobby,

Yes we had to start from the beginning, but since the plugin didn't got installed properly, we made no changes to the website. After we installed it properly we started with making changes.

The fatal error hasn't come back till this day, so I guess it is solved. However, we still experience issues with the "Installation failed: Could not create directory". Some Google Search results show that we get that message due to wrong permissions. We can't install any plugin now because of this.

Any idea how to solve this error?

Kind regards,

Joost

March 29, 2019 at 7:58 pm #3494639

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi Joost,

when i deactivate WPML i am able to install a plugin but that is only IF i enter the FTP credentials in the backend

additionally when i try to access the FTP manually the public html directory is not accesible either with WPML activated or deactivated

i believe this might require your host provider to take a look at the structure as something seems off , let me know their feedback

April 1, 2019 at 11:27 am #3507207

joostv-20

Hi Bobby,

The host provider has checked some things, but he can't find anything strange in the permissions or anything else. After running some debugging he got the error like attached photo.

This file can be found in: /domains/huskyhoreca.nl/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/ui/dist/js

this causes an error and we think that this blocks the FTP-popup (username and password before installing a plugin) so the plugins can't be installed or updated. So it seems that someting in WPML blocks it and triggers the error.

On the other hand... this message/error (like attached picture) does not appear in Chrome. So I could be that this has nothing to do with installing or updating the plugins.

I've been asked if you could check again. Maybe WPML needs some permissions on some specific folders or files that are called up when a plugin is installed?

Or are we fooled because of this error (attached) and it has nothing to do with de 'could not create directory'-message.

Best regards,
Joost

April 1, 2019 at 9:58 pm #3512035

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

I checked your wp_capabilities within your database table usermeta and its set up as expected.

I also re installed WPML to make sure you have a fresh installation .

How are you adding the pop up for the verification when installing a plugin ? What are your results when its deactivated

there might be a compatibility issue between it and WPML but its not clear to me yet.

maybe if i knew how this pop up is added i will have a better idea.

April 8, 2019 at 8:02 am #3555275

joostv-20

Hello Bobby,

Thank you for your feedback.

We have disabled the popup by adding FTP credentials in the wp_config.php file. Now WordPress is not asking for credentials, but installing updates, or plugins is still not possible. when WPML is enabled.

This error: Could not create directory, is pretty straight forward and it does not appear when WPML is disabled.

I think we have to look into this:

- Does WPML create directories per plugin where, when updating, or installing plugins, the system needs to have write access? PHP is running as Apache on our webserver. Plugins are installed by FTP. This could potentially be the cause of permission errors.
- We could try to locate this folder and set the right permissions. Maybe, the ftp user does not have rights to create directories in a by Apache created folder.

I hope you can assist us further, because it is essential that we can install plugins and updates with wpml enabled.

April 8, 2019 at 7:55 pm #3561117

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

This issue is related to WPML String Translation.

once WPML string translation is deactivated i am able to install a plugin on your site.
[when ST is activated, the FS_METHOD is turned to direct (automatically)]

Our developers are aware of the issue and are currently reviewing it, once there are news i will update you here

you can also see some more details on the same issue in this Spanish ticket (i use google chrome to translate the page):
- https://wpml.org/es/forums/topic/wpml-string-translation-afecta-al-sistema-ftp-de-wordpress/

April 18, 2019 at 6:57 am #3636433

joostv-20

Hi Bobby,

Any update? (I guess not, otherwise I suppose you would have let us know). But the problem is still actual. Can you tell something about the time it will take for the developers to resolve the issue?

Joost

April 18, 2019 at 7:20 am #3636749

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

at the moment there is no known ETA for a solution here , once i have more news i will make sure to update this ticket, and it wont be automatically closed as i have escalated.

Furthermore i believe my colleague has mentioned a way to resolve this here
-> https://wpml.org/es/forums/topic/wpml-string-translation-afecta-al-sistema-ftp-de-wordpress/#post-3439789

(i use google chrome browser to automatically translate the page if needed)

May 3, 2019 at 5:27 am #3730933

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

the issue has been fixed. The fix should be available in the latest major version of WPML plugins.

Thanks for your patience.

May 3, 2019 at 7:33 am #3731553

joostv-20

Hi Bobby,

That would be very nice 🙂

Check, check, double check: do you mean the update(s) that was/were released a few days ago? I don't see any available updates at this moment (we already installed the updates from earlier this week).