Skip to content Skip to sidebar

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
- 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 -
- 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 -

Supporter timezone: Europe/Vienna (GMT+02:00)

This topic contains 3 replies, has 0 voices.

Last updated by khaledA-37 12 hours, 42 minutes ago.

Assisted by: Marcel.

Author Posts
April 5, 2026 at 11:22 am #17949989

khaledA-37

I have an English installation that is working fine, however, when I translated the site to Arabic, the content was translated correctly with no issues, however, the booking system in the Arabic version is not working, it is displayed correctly but the submit button is not working.

April 7, 2026 at 1:13 pm #17954363

Marcel
Supporter

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

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

Hi,

do you have a staging environment where I could take a look? Ideally, it would be helpful if you could include an example booking entry so I can reproduce the issue.

I would eventually also need to request temporary access (WP-Admin and FTP) to your site
– preferably to a test site where the problem has been replicated if possible –
in order to be of better help and check if some configurations might need to be changed

Your next answer will be private which means only you and I have access to it.

❌ Please backup your database and website ❌

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

✙ Please add the Links to the […] Edit Screen, the Page/Post where you insert the […] and the corresponding Front End Page/Screen

Thank you!

Best regards,
Marcel

April 10, 2026 at 5:48 am #17961013

Marcel
Supporter

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

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

Hi Khaled,

thanks for the access! What is happening is a fatal error based on JS console:

jquery.min.js?ver=3.7.1:2 
 POST <em><u>hidden link</u></em> 500 (Internal Server Error)
send	@	jquery.min.js?ver=3.7.1:2
ajax	@	jquery.min.js?ver=3.7.1:2
(anonymous)	@	jquery-migrate.min.js?ver=3.4.1:2
(anonymous)	@	jquery-migrate.min.js?ver=3.4.1:2
tourmaster_room_booking_ajax	@	tourmaster-room.js?ver=6.9.4:118
(anonymous)	@	tourmaster-room.js?ver=6.9.4:543
dispatch	@	jquery.min.js?ver=3.7.1:2
ce.event.add.v.handle	@	jquery.min.js?ver=3.7.1:2

I activated the WP debug log and this is happening:

[10-Apr-2026 05:28:28 UTC] PHP Fatal error:  Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, string given in /customers/2/3/9/***/webroots/fefcb5cd/wp-content/plugins/tourmaster/room/include/booking-bar.php:596
Stack trace:
#0 /customers/2/3/9/***/webroots/fefcb5cd/wp-content/plugins/tourmaster/room/include/booking-bar.php(754): tourmaster_check_package_date('', '2026-04-12')
#1 /customers/2/3/9/***/webroots/fefcb5cd/wp-content/plugins/tourmaster/room/include/booking-bar.php(487): tourmaster_room_price_breakdown(Array, true)
#2 /customers/2/3/9/***/webroots/fefcb5cd/wp-content/plugins/tourmaster/room/include/booking-bar.php(449): tourmaster_room_booking_bar_summary(Array)
#3 /customers/2/3/9/***/webroots/fefcb5cd/wp-includes/class-wp-hook.php(341): tourmaster_room_booking_form_ajax('')
#4 /customers/2/3/9/***/webroots/fefcb5cd/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters('', Array)
#5 /customers/2/3/9/***/webroots/fefcb5cd/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#6 /customers/2/3/9/***/webroots/fefcb5cd/wp-admin/admin-ajax.php(192): do_action('wp_ajax_tourmas...')
#7 {main}
  thrown in /customers/2/3/9/***/webroots/fefcb5cd/wp-content/plugins/tourmaster/room/include/booking-bar.php on line 596

The first argument is an empty string (''), but the function expects something countable (likely an array of dates or packages). The plugin fails in Arabic because it cannot parse localized Arabic date strings, resulting in invalid (empty) data being passed where an array is expected. This leads to a PHP 8 fatal error when count()/sizeof() is called on a string instead of a valid array. I would recommend. you to reach out ot the plugin authors to inform them about it.

A good starting fix would be to ensure the plugin does not rely on localized date strings for processing. Instead, all incoming dates (from the frontend/AJAX) should be converted into a standard format like YYYY-MM-DD before being used internally. Additionally, adding a safeguard like is_countable() before calling count()/sizeof() would prevent crashes when invalid data is received.

I attempted to apply a temporary workaround, but unfortunately the site crashed. Could you please restore the original file at:
wp-content/plugins/tourmaster/room/include/booking-bar.php

You can find the original code here: https://pastebin.com/4nJLx6a5
Alternatively, you can provide FTP access and I will restore it for you.

Best regards,
Marcel

April 10, 2026 at 4:00 pm #17962590

khaledA-37

Ok done, I replaced the file and removed the front end warning with this script in wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);

Now here you are the FTP access details

log in with SFTP, use this info:

Host: ssh.cv4w84wys.service.one

Username: cv4w84wys_ssh

Port: 22
pass:
wupbad-buvkyn-hyrNi8

Awaiting your feedback

Regards

Khaled