Home Forums Backend Issues (wp-admin) Can't add Images on options page.


Can't add Images on options page.

  • Can’t add images on options page. The field is present but can’t select anything.

    Adding an Image Field to to an Options page gives the error:
    TypeError: is undefined

    Removing the Image field clears the error.

  • Have you tried deactivating other plugins?

    Are you using gubenberg or classic editor?

    Can you give a more detailed JS error report?

  • Deactivated all other plugins (except Timber required for my theme) and error persist.

    Using Gutenberg editor.

    I was able to narrow down what was causing the issue:
    I have a script enqueued in the admin

    wp_enqueue_script('admin', get_template_directory_uri() . '/assets/src/js/admin.js',
    			array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-plugins', 'wp-components', 'wp-edit-post', 'wp-api', 'wp-editor', 'wp-hooks', 'lodash', )
    			, '1', false );

    When I remove the following dependencies the error goes away

    'wp-components', 'wp-edit-post', 'wp-api', 'wp-editor', 'wp-hooks'

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.