This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Media Form field documentation error

Open 4 replies bug-reportpluginplugin-page-builder
Started · Latest reply by Roman Ranniew

Media type form field for widget doesn’t take the values specified here https://siteorigin.com/docs/widgets-bundle/form-building/form-fields/ . “all” option is “*” and it takes file mime types, so for example for pdf you can just type application/pdf. That data must be hooked up to a wrong variable in wp core inside that media popup xhr.

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

4
  1. Alex S Staff

    Hi Roman,

    I’m unable to replicate what you’ve described. Could you send me a copy of your code so I can check over it?

    For reference, application/pdf doesn’t, or rather in your case, shouldn’t work. There also isn’t an all option.

  2. Roman Ranniew

    That’s my point. According to the documentation “all” should fetch all of the library items, while it gives none. Instead “*” returns all file types. I’m extending SiteOrigin_Widget class, exactly like the widgets from the widgets bundle.

    I simply checked your core code. You can also simply replicate it by changing “data-library” field inside any widget that has media button in the wp admin.

  3. Alex S Staff

    Hi Roman,

    Maybe we’re looking at different documentation – there’s no mention of the word all. To clarify, are you reading this documentation or different documentation?

    I stand corrected regarding all working though – that does in fact work. Regardless, it’s not actually mentioned. Is your issue that it’s not mentioned?

  4. Roman Ranniew

    Yes! Apologies, my fault, it’s pretty hectic here. Yes. The ‘all’ option came from wp documentation on the media upload button. I thought that you’re using that function to create the media button, but apparently not.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread