I am trying to:
save a CPT where I entered a custom archive slug including a "/"
Link to a page where the issue can be seen:
No. I passed to 7.3
I expected to see:
Save OK
Instead, I got:
Error on save : using array_key_exists on object . Error on 7.4. On 7.3 error does not appear.
Good evening, thank me.
Hello,
Please elaborate the question with more details:
- Provide the full PHP debug logs
- provide detail steps to duplicate the same problem.
I have tried below steps in my localhost, please correct me if there is any missing.
1) In a PHP 7.4 environment, install Toolset Types plugin in a fresh WP installation
2) Dashboard-> Settings-> Permalink, choose option "Post name"
3) Create a custom post type "test-cpt", in input box below option "has_archive", fill value: /
4) Create a new "test-cpt" post, publish the post, it works fine, and in front-end the URL is:
hidden link
I don't see any PHP errors
Hello Luan, long time , no see !
Sorry for the delay in my answer.
This is the output error I am still reproducing on upgrading to php 7.4:
Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in xxx/wp-content/plugins/types/vendor/toolset/types/embedded/classes/class.wpcf-post-types.php on line 471
However : The error does appear too when I don't insert a slash in the box. I tried to see which field was inducing the error but did not find.
My Custom post type is quite simple, no relationships, a majority of defaults.
PHP exact version is 7.4.5. WP and all plugins are up to date (Type 3,3,10)
I'm sorry I won't be able to investigate further or to give you more details as I am missing time. I downgraded my server to php 7.3 ans everything works fine.
I just wanted to give toolset information about what I think is a bug. Feel free to pass the issue as resolved then !
Have a good day
Charles