Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with accessing the editor menu in Bricks Builder on their development site. They encounter a WPML banner with a message indicating the site is registered as a development site and then get redirected back to the Site Dashboard. Additionally, they face a 302 redirect when trying to edit with Bricks, and receive communication errors when pulling in translation data. The Tools and Jobs pages do not load and display errors. The issue was found to be related to a custom function added by a developer that broke the /wp-json endpoint.

Solution:Remove a function that is added from the dev with a script to console log

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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Kor 9 months, 2 weeks ago.

Assisted by: Kor.

Author Posts
February 21, 2024 at 2:11 pm #15328552

kalleV-3

I'm trying to access any editor menu in my Development site (Bricks Builder) , but all I get is WPML banner
and the following message and then it redirects me back to the Site Dashboard:

"This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner."

Is this some known issue from WPML or there's something wrong with the configuration ?

The request to Edit With Bricks gets cancelled and I get 302 redirect.

Could it be tied with registration of the pages? To the setup we have?
Because we copy from everything from Staging to Production environment .

February 21, 2024 at 2:15 pm #15328599

kalleV-3

Also,
When trying to pull in the translation data, I get an error
"A communication error has appeared. Please wait a few minutes and try again."

I think those are connected...

February 22, 2024 at 7:52 am #15331364

kalleV-3

Tools page doesn't load, Jobs page doesn't load anything and just throws errors ...

February 22, 2024 at 8:05 am #15331522

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for contacting us.

I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

February 22, 2024 at 8:11 am #15331539

kalleV-3

Hi,
The issue is resolved, apparently when some of the devs added a function with a script to console log, it broke /wp-json
function debug_to_console($data) {
$output = $data;
if (is_array($output)) {
$output = implode(',', $output);
}
$formattedoutput = sprintf('Debug 1: %s', $output);

echo "console.log('$formattedoutput');";
}

debug_to_console($analytics_dataplane);
debug_to_console($analytics_key);

Be careful of this, don't know the logic behind this, but will try to investigate more.