Thank you for contacting WPML Support, I will be happy to help you.
1) Could you please tell me if this issue happens with post/page which that specific editor user created/translated or with other users post/page?
2) Is that the default WordPress editor user or a custom user based on it?
3) It might not be related but I noticed from the debug information that you are using WPML v.4.6.7, I'd suggest you update to the latest version v.4.6.8.
1) Could you please tell me if this issue happens with post/page which that specific editor user created/translated or with other users post/page?
It is quite inconsistent, because it sometimes it works if the user created the page/post, and sometimes it doesn't
2) Is that the default WordPress editor user or a custom user based on it?
Yes, it is the default WordPress editor
3) It might not be related but I noticed from the debug information that you are using WPML v.4.6.7, I'd suggest you update to the latest version v.4.6.8.
Will it be possible to check if the issue happens in a minimal setup, that meaning using a default WP theme and keeping active only the WPML plugins active, and deactivating the rest of the plugins?
If the issue doesn't happen with only the WPML plugins active, then I would suggest activating the rest of the plugins one by one while monitoring if the issue happens when you activate a specific plugin.
That would help checking if there is any possible incompatibility issue going on.
So, I managed to track down the issue to this file "plugins/sitepress-multilingual-cms/classes/url-handling/wpml-url-filters.class.php"
There is a method which registers global hooks called "public function add_global_hooks" and it has this line "add_filter( 'get_edit_post_link', [ $this, 'get_edit_post_link' ], 1, 3 )" in it
So, when I jump to the method "get_edit_post_link" which has the following code
Could you please tell me if you were able to find out that the issue was being caused from that code in a minimal setup or in a normal setup of your website?
* If it was in a normal setup, could you please guide me through the steps you were able to debug the issue till the code you sent me?
What I did is check how WordPress generates the edit link for the admin table listing, of which I found the function `get_edit_post_link` in `wp-includes/link-template.php` and it has this
So, I checked in the theme, and any plugins for any code that might be using/calling this hook
I didn't find it in the theme, so I went on the plugins and I found the hook being used in the `classic-editor` and `sitepress-multilingual-cms` plugin
I played around with the `classic-editor` plugin, and it didn't affect the edit link
When I went on to the `sitepress-multilingual-cms` plugin, I encountered the issue I sent in my previous reply
Thanks for the update, ould it be possible to check if the issue happens in a minimal setup, that meaning:
- keep the theme you have
- keep active only WPML Plugins and must have plugins to run the theme
- disable all other plugins
After, check if the issue is still happening.
Note: Please make sure you have a full backup (files & database) before trying anything on your website.
------
Also, in order to further troubleshoot the issue I would require a copy of your website to
further escalate the issue.
You can use the Duplicator plugin(https://wordpress.org/plugins/duplicator/) in order to create a copy of your website, and upload the backup on a file sharing website (Google Drive, Dropbox, etc.), please send me the link to download the backup after.
* Please try to minimize the size of the backup file by excluding unnecessary media files or backup folders that might be in the "/wp-content/" folder.
I’ve set your next reply as private in order for you to provide the Duplicator link.
I do apologize for the delay, I did manage to test locally.
I created a new user "editor" and checked editing posts/pages without any problem, I noticed that when the user tries to edit the custom posts then it shows only a white screen.