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.

This topic contains 2 replies, has 0 voices.

Last updated by nielsB-10 3 days ago.

Assisted by: Kor.

Author Posts
May 23, 2025 at 10:04 am #17065375

nielsB-10

Background of the issue:
I am trying to delete a custom post type (CPT) for a team member, but I encounter a critical error. After some time, the site recovers, but the translated page remains available. I have provided a link to the page where the issue can be seen: hidden link. Additionally, I have a video of the issue but cannot upload it here.

Symptoms:
When I attempt to delete the CPT again, I receive a fatal error. The error details are as follows: An error of type E_ERROR was caused in line 26 of the file /home/617149.cloudwaysapps.com/etmrqwhkur/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/post-menus/wpml-posts-listing-page.class.php. Error message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/617149.cloudwaysapps.com/etmrqwhkur/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/post-menus/wpml-posts-listing-page.class.php:26.

Questions:
How can I delete a custom post type without encountering a fatal error?
What is causing the Uncaught TypeError in the WPML plugin?

May 23, 2025 at 10:10 am #17065419

Kor
WPML Supporter since 08/2022

Languages: English (English )

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

Thanks for your patience. Here is the ticket. 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.

May 26, 2025 at 12:52 am #17070682

Kor
WPML Supporter since 08/2022

Languages: English (English )

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

Thanks for your reply. Unfortunately, I won't be able to troubleshoot the issue if I cannot replicate this on your staging site.

I kindly ask for a snapshot of the production site. Alternatively, with your permission, I can create one myself. For this purpose, I typically recommend using the free plugin "Duplicator." If you're already familiar with Duplicator (https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.

To guide you further, please adhere to these instructions:

1. View the Duplicator instructions video: hidden link

2. Consult WPML's instructions on providing supporters with a copy of your site: https://wpml.org/faq/provide-supporters-copy-site/

3. If the archive file exceeds 400MB, please use Duplicator's file filters to exclude cache, wp-uploads directory, media, and archive files.

Once you have the archive file ready, kindly share the link with us. You can utilize platforms like Google Drive, Dropbox, or similar for file sharing, as the snapshot file might be large.

Please note that your next reply will be private, visible only to you and me. You can paste the file link there. Rest assured that once the issue is resolved, I will delete the local site.

May 26, 2025 at 10:16 am #17072520

nielsB-10

Hi,

Will contact support if i need to do a similar update on the original. Very strange if make copy of the site this problem does not show.

Cheers