If you are having a notice about writing the .mo files please read this doc

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 thread is resolved. Here is a description of the problem and solution.

Problem:
Raidboxes media translation causes the blank screen upon saving
Solution:
Raidboxes code overwrites anything already in the window's onload event.

window.onload = ...

We cannot solve this on our side and this is not the right way to do this.
They should add on to existing onload handlers, not overwrite them.

This topic contains 14 replies, has 2 voices.

Last updated by Bruno Kos 1 week, 3 days ago.

Assigned support staff: Bruno Kos.

Author Posts
March 14, 2019 at 3:17 pm #3346201

alecC

I am trying to:
...save the settings I have selected for Media Translation (like not duplicating media attachments)

Link to a page where the issue can be seen:
hidden link
hidden link

I expected to see:
...the confirmation of the saving process

Instead, I got:
...a white page, settings are not saved
hidden link

As a matter of fact, because of this setting WPML has created 1000 copies of woocommerce invoices and added them to the media library, where I can not delete them, unless I deactivate WPML completely

March 15, 2019 at 12:05 pm #3353695

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Thank you for contacting WPML support!

White screen might mean some PHP fatal error. Therefore, can you please enable the WordPress debug log. This will allow us to see if any PHP errors are being produced.

1. Edit wp-config.php and insert the following lines:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

2. Reproduce the issue (saving media translation settings).

3. Locate the debug log in: /wp-content/debug.log

4. Paste the latest lines here. No need to paste the entire log file, just 50 lines or so will do. Please censor any sensitive information.

https://codex.wordpress.org/Debugging_in_WordPress

Regards,
Bruno Kos

March 18, 2019 at 11:08 am #3368505

alecC

Hi Bruno,

thanks for your feedback. Below you will find the entries from the log (however there is nothing there regardings WPML)

However just FYI--> I have created a staging environment where I deactivated all plugins except WPML, the issue was still unfortunately there.

[18-Mar-2019 11:00:42 UTC] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/wp/disk/wordpress/wp-content/plugins/js_composer/include/classes/core/class-vc-mapper.php on line 186
[18-Mar-2019 11:00:44 UTC] PHP Notice: Constant PFC_IGNORE_COMPOSER_WARNING already defined in /home/wp/disk/wordpress/wp-content/plugins/flow-flow/libs/phpFastCache.php on line 17
[18-Mar-2019 11:00:49 UTC] PHP Notice: Constant PFC_IGNORE_COMPOSER_WARNING already defined in /home/wp/disk/wordpress/wp-content/plugins/flow-flow/libs/phpFastCache.php on line 17
[18-Mar-2019 11:01:26 UTC] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/wp/disk/wordpress/wp-content/plugins/js_composer/include/classes/core/class-vc-mapper.php on line 186
[18-Mar-2019 11:03:15 UTC] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/wp/disk/wordpress/wp-content/plugins/js_composer/include/classes/core/class-vc-mapper.php on line 186

March 18, 2019 at 2:24 pm #3370197

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Thank you for contacting WPML support!

Can you provide me wp-admin and FTP logins for the staging area so that I could check? Question - are these logs appearing at the exact moment when you try to save? These look only as some notices and may not be the culprit behind the white screen.

Regards,
Bruno Kos

March 19, 2019 at 9:56 am #3377581

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

I agree - I've tried to recreate this few times, but to no avail, debug.log isn't appearing. However, I think this has something to do with permissions - WordPress not being able to create debug.log on the server. I've tried to upgrade WordPress (will all the plugins not active) and this is what I get. When I tried the same using SFTP, I get "open for write: permission denied".

How about we start with WordPress being upgraded to 5.1.1. first and see where will this take us? Can you try this directly from the hosting panel? Also, I am wondering if the same issue for this blank screen is behind the MT issue as well.

Regards,
Bruno Kos

March 19, 2019 at 10:13 am #3377677

alecC

Hi,

I have just updated to 5.1.1, however the problem still persists.
Also the reason for the WP core update not being able to auto-update was that the current WP version was fixed by me manually via the hosting panel.

You can also go ahead and check the hosting panel. It's a managed wordpress hoster, like flywheel, or wpengine, but a German one.

You can go here and login, using the same username/password I gave you for SFTP access:
hidden link

March 19, 2019 at 10:22 am #3377773

alecC

P.S. there are plenty of option in the hosting panel, so feel free to take a closer look at it.

March 19, 2019 at 3:38 pm #3380739

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

I don't think that will be needed, since I was able to reproduce this on my localhost (using Duplicator package) where I use Apache, so there's definitely something within the site causing this. I've sent this to our 2nd tier for further analysis and will get back to you as soon as I hear from them.

Regards,
Bruno Kos

March 20, 2019 at 12:05 pm #3388167

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

This issue has been escalated to 2nd tier. I will update this thread as soon I will have some news or questions for you!

Regards,
Bruno Kos

March 22, 2019 at 8:18 am #3438427

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

It seems like that this is caused by code in rb-plugins\raidboxes-admin-menu\raidboxes-admin-menu.php

It seems to be caused by the code that adds admin script:

add_action('admin_enqueue_scripts', 'raidboxes_cache_purge_action_js');

and

function raidboxes_cache_purge_action_js() { ?>
    <script type="text/javascript">
        document.addEventListener("DOMContentLoaded", function(event) {
            if (document.getElementById("wpadminbar")) {
                window.onload = function() {
                    <?php echo 'var ajaxurl = "' . admin_url('admin-ajax.php') . '";'; echo "\n"; ?>
                    jQuery("li#wp-admin-bar-raidboxes-purge-cache .ab-item").on( "click", function() {
                        var data = {
                            'action': 'raidboxes_purge_cache',
                        };
                        jQuery.post(ajaxurl, data, function(response) {
                            jQuery('#wpbody-content').prepend('<div id="raidboxes-purge-cache-notification" class="notice notice-success"><p>'+response+'</p></div>');
                            jQuery('#raidboxes-purge-cache-notification').delay(2000).fadeOut(3000);
                        });
                    });
                };
            }
        });
    </script> <?php
}

That JS code is most probably overwriting the our "onload" handler, so the JS is not attached to the buttons and nothing works. Removing this code fixes this, however we will let you know if we more elegant solution to this.

Regards,
Bruno Kos

April 3, 2019 at 2:14 pm #3527005

alecC

Hi Bruno,

thanks for the detailed feedback.
The plugin causing the error is a plugin which is used by our hosting provider who is a managed WordPress hoster (like wpengine & co) and implement the scripts mentioned directly on their server so that it can not be removed unfortunately.
Besides that I have forwarded your feedback to the guys from raidboxes and their reply was that it "is a convention as a plugin author like WPML not to us this function", therefore also raidboxes suggests that there should be a more "elegant solution" to this issue, hence they can not remove this function from their servers so easily.
Can you please run this by your second tier guys, so that they could maybe implement it in the next release?
Looking forward to your feedback as well as for a possible timeline by when this problem can be solved.
Thanks
Alec

April 3, 2019 at 3:34 pm #3528161

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

I've passed this information to our Compatibility team, but there haven't been any news since I replied last.

Regards,
Bruno Kos

April 4, 2019 at 1:40 pm #3535361

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Raidboxes code overwrites anything already in the window's onload event.

window.onload = ...

We cannot solve this on our side and this is not the right way to do this.
They should add on to existing onload handlers, not overwrite them.

Regards,
Bruno Kos

April 19, 2019 at 9:00 am #3644249

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Since based on all the debugging we've done and the fact that we can't do anything here (as explained on APRIL 4, 2019 AT 1:40 PM), can you tell me if there's anything else I can help you with?

Otherwise, I believe that we can close this ticket.

Regards,
Bruno Kos

November 8, 2019 at 2:26 pm #4914065

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Please see this, the workaround is no longer needed.
https://wpml.org/errata/javascript-conflict-with-raidboxes-hosting/

Regards,
Bruno Kos