wp-papi / papi

:rocket: WordPress Page Type API with custom fields
https://wp-papi.github.io
MIT License
263 stars 32 forks source link

Link property type always required #165

Closed ekandreas closed 8 years ago

ekandreas commented 8 years ago

What I expected

Required field in the wp-admin should accept data for a link property.

What happened instead

All fields for a link added but still papi locks the editor from saving the post with required data for link.

Steps to reproduce

Add a property to a meta like

            papi_property( [
                'slug'  => 'external_source',
                'required' => true,
                'title' => 'Outgoing Link',
                'type'  => 'link',
            ] ),

Try to save the post and an error message stops the post from being updated.

The link property was ok in earlier versions.

What versions of softwares are you using?

frozzare commented 8 years ago

This is now fixed in 3.x branch. You can use it direct with "wp-papi/papi": "3.x-dev#ed731e6e4f01c67c3549fa17277d1bd76e113928" instead of waiting on v3.0.4.

vinkla commented 8 years ago

Or better yet, specify it with the branch alias ^3.1.

frozzare commented 8 years ago

@vinkla no since v3.1 is unstable and v3.0.4 will be out before v3.1. So don't do that :)

vinkla commented 8 years ago

Don't use commits hash. It is bad practice.

vinkla commented 8 years ago

Better wait on the next release.

frozzare commented 8 years ago

It's not recommended to use unstable versions like you recommend.

vinkla commented 8 years ago

It is not recommended to target specific commit hashes.

frozzare commented 8 years ago

No, but better to use a stable version than a unstable version that isn't finished.

vinkla commented 8 years ago

Then add a branch alias instead. We shouldn't recommending bad practice.

frozzare commented 8 years ago

You shouldn't recommend to use a unstable version. It's very bad.

vinkla commented 8 years ago

It depends on the implementation really.

frozzare commented 8 years ago

The readme says that master branch is unstable where v3.1.0 is.