Skip Navigation

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
9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+03:00)

This topic contains 1 reply, has 2 voices.

Last updated by Osama Mersal 12 months ago.

Assisted by: Osama Mersal.

Author Posts
June 8, 2024 at 9:44 pm #15718682

omarC-11

I have a code block on a page using the Enfold theme that looks like this:

<div id="border2" class="imageLinkContainer imageblock">
    <img class="imagelink" src="LINK TO IMAGE" onclick="showimagemenu(2)" />
</div>

However, when I use WPML, in the translation it changes to:

<div id="border2" class="imageLinkContainer imageblock">
    <img class="imagelink" src="LINK TO IMAGE" />
</div>

The onclick attribute is removed, despite my attempts to keep it. I suspect WPML is filtering it out. Is there a way to disable these filters?

June 9, 2024 at 8:41 am #15719060

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

1) Please log in to this sandbox site and install the Enfold theme. (hidden link)

After that, please try to replicate the issue. If it is replicable, please let me know how to reproduce it so I can consult our compatibility team.

2) It's unrelated to the issue, but according to your Debug.info, the WP memory limit needs to be increased. PHP memory is fine, but WordPress uses 40Mb as default. The minimum requirements for WPML are 128 MB. (Kindly check this page https://wpml.org/home/minimum-requirements/)

You can increase it by adding the following code in your wp-config.php file right before the /* That's all, stop editing! Happy publishing. */ line:

/* Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M');

Best regards,
Osama

The topic ‘[Closed] onclick attribute filtered in the code block when used enfold with wpml’ is closed to new replies.