Skip Navigation

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

Problem:
If you're experiencing an issue where the admin notice contains an invalid URL, this might be due to the lack of URL arguments on certain pages like the dashboard.
Solution:
We plan to address this in a future release. Meanwhile, you can use the following workaround:

$message  = '<div class="message error otgs-is-dismissible">';<br />$message .= '<p>';<br />$message .= sprintf( $reset_cart_message, $reset_cart_configure_link );<br />$message .= '</p>';<br />if (strpos($request_url, '?') !== false) {<br />$message .= '<a class="notice-dismiss" href="' . $request_url . '&wcml_action=dismiss_cart_warning"><span class="screen-reader-text">' . esc_html__( 'Dismiss', 'woocommerce-multilingual' ) . '</a></span>';<br />} else {<br />$message .= '<a class="notice-dismiss" href="' . $request_url . '?wcml_action=dismiss_cart_warning"><span class="screen-reader-text">' . esc_html__( 'Dismiss', 'woocommerce-multilingual' ) . '</a></span>';<br />$message .= '</div>';

Additionally, this issue was resolved in WooCommerce Multilingual version 5.5.0.

Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

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 5 replies, has 0 voices.

Last updated by Marcel 3 days, 23 hours ago.

Assisted by: Marcel.

Author Posts
November 23, 2024 at 5:42 am #16435572

desireeM

Background of the issue:
admin notice contains invalid URL:

<a class="notice-dismiss" href="/wp-admin/&wcml_action=dismiss_cart_warning">

Symptoms:
The URL in the admin notice is incorrect. I expected to see: /wp-admin/?wcml_action=dismiss_cart_warning, but instead, I got: /wp-admin/&wcml_action=dismiss_cart_warning.

Questions:
Please fix this.

November 26, 2024 at 11:09 am #16444201

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

thank you very much for your report. I have forwarded them to our development team and will keep you updated as soon as we receive feedback.

Best regards,
Marcel

November 27, 2024 at 2:43 pm #16450668

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

We plan to integrate this in one of the upcoming releases. The issue arises because certain pages, such as the dashboard, lack URL arguments. In the meantime, you can use the following workaround:

	$message  = '<div class="message error otgs-is-dismissible">';
		$message .= '<p>';
		$message .= sprintf( $reset_cart_message, $reset_cart_configure_link );
		$message .= '</p>';
		if (strpos($request_url, '?') !== false) {
			$message .= '<a class="notice-dismiss" href="' . $request_url . '&wcml_action=dismiss_cart_warning"><span class="screen-reader-text">' . esc_html__( 'Dismiss', 'woocommerce-multilingual' ) . '</a></span>';
		} else {
			$message .= '<a class="notice-dismiss" href="' . $request_url . '?wcml_action=dismiss_cart_warning"><span class="screen-reader-text">' . esc_html__( 'Dismiss', 'woocommerce-multilingual' ) . '</a></span>';
		}
		$message .= '</div>';

Best Regards,
Marcel

November 27, 2024 at 10:05 pm #16451814

desireeM

Please fix it

November 28, 2024 at 8:18 am #16453376

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Yes, you will get informed here once it's available.

Best Regards,
Marcel

July 7, 2025 at 3:09 pm #17209828

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

this was fixed with WooCommerce Multilingual 5.5.0.

Best Regards,
Marcel