Support » Plugin: CMB2 » PHP notice when activating custom field types

  • Resolved scottsawyer

    (@scottsawyer)


    I made a couple of custom field types as plugins including https://github.com/scottsawyer/cmb2-field-address. However, when I activate the plugins, I receive php notices:

    PHP Warning: include_once(/public/wp-content/plugins/cmb2/includes/CMB2_Field_Address.php): failed to open stream: No such file or directory in /public/wp-content/plugins/cmb2/includes/helper-functions.php on line 44
    Warning: include_once(/public/wp-content/plugins/cmb2/includes/CMB2_Field_Address.php): failed to open stream: No such file or directory in /public/wp-content/plugins/cmb2/includes/helper-functions.php on line 44
    PHP Warning: include_once(): Failed opening ‘/public/wp-content/plugins/cmb2/includes/CMB2_Field_Address.php’ for inclusion (include_path=’.:/usr/share/php’) in /public/wp-content/plugins/cmb2/includes/helper-functions.php on line 44
    Warning: include_once(): Failed opening ‘/public/wp-content/plugins/cmb2/includes/CMB2_Field_Address.php’ for inclusion (include_path=’.:/usr/share/php’) in /public/wp-content/plugins/cmb2/includes/helper-functions.php on line 44
    Plugin ‘cmb2-field-address’ activated.

    As you can see, CMB2 recognizes the new field type, but the helper function is attempting to load the plugin file from the CMB2 plugin directory. It also appears it’s capitalizing the plugin name ( maybe because the plugin class name? ).

    The plugin activates, the field seems to work, so this is not a show stopper, but I’d love to clear this up.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP notice when activating custom field types’ is closed to new replies.