Viewing 5 reply threads
  • Author
    Posts
    • #956
      chrisben
      Member

      Using wordpress 3.6, when piklist plugin is activated I can see javascript errors in my console when browing admin pages:

      Uncaught TypeError: Cannot read property 'id' of undefined load-scripts.php?c=0&load%5B%5D=underscore,shortcode,backbone,wp-util,wp-ba…log,wpdialogs,wplink,wpdialogs-popup,wp-fullscreen,media-upload&ver=3.6:36
      

      This breaks javascript in wordpress preventing me from even using tabs within the admin part.
      For instance on Add a new Page, switching the editor tab from Visual to text is not possible:

      Uncaught TypeError: Cannot call method 'switchto' of undefined post-new.php?post_type=page:246
      

      This problem disappears when piklist is disabled, hinting me that this might well be a problem with piklist.
      Reproduced with Chrome, and Firefox but with a different error reported:

      Error: TypeError: wp.media.view.settings.post is undefined
      Source File: http://www.harold.fr.local/wp-admin/load-scripts.php?c=0&load%5B%5D=underscore,shortcode,backbone,wp-util,wp-backbone,media-models,wp-plupload,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquer&load%5B%5D=y-ui-sortable,media-views,media-editor,thickbox,theme-preview,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris,wp-co&load%5B%5D=lor-picker,jquery-ui-position,wp-pointer,hoverIntent,common,admin-bar,schedule,wp-ajax-response,autosave,suggest,jquery-color,wp&load%5B%5D=-lists,postbox,heartbeat,post,wp-auth-check,jquery-ui-datepicker,word-count,editor,quicktags,jquery-ui-resizable,jquery-ui-butto&load%5B%5D=n,jquery-ui-dialog,wpdialogs,wplink,wpdialogs-popup,wp-fullscreen,media-upload&ver=3.6
      
    • #969
      atomworks
      Member

      Having the same issue as this on a local development I’m working on.

    • #971
      atomworks
      Member

      I’ve done some digging around as this has been a problem for me and found out why this is doing this (at least for me). It seems to be based around code in class-piklist-admin.php at lines 112 – 115.`if (!post_type_supports(get_post_type((int) $_REQUEST['post']), 'thumbnail'))
      {
      wp_enqueue_media();
      }`

      Doing a quick var_dump on $_REQUEST, when I am making a new post there isn’t actually a ‘post’ key in the array yet, this only appears once the post has been made.

      If I comment out these lines, everything seems to work as normal – both the featured image and the piklist file meta function correctly. I guess this is because the post type supports thumbnails and so doesn’t need to run the wp_enqueue() media anyway. In my mind if I’m going to be using the things that this would include I’d already be using the thumbnail support anyway so I’ll be leaving this commented out until it’s been officially fixed.

      Hope that’s of some use to people having issues here and be of some use to the Piklist team.

      EDIT: Actually, adding a file in a meta box doesn’t seem to save out so I could be mistaken, I believe that could be my fault though.

      EDIT 2: Yes, seems to work. Made a mistake in my meta box code on that front.

    • #974
      Kevin
      Keymaster

      Hi Atomworks-

      Thanks for the catch, I will look into it asap. This is from the new upload fields we released in the last version of the trunk and is proving to be a little more than tricky 🙂 I will post and update here as soon as I have one.

      Thanks again!

      Kevin

    • #978
      atomworks
      Member

      No worries at all, trying to be a little more pro-active on issues to make everyones life a bit easier if I can. Love working with Piklist so nice to give back even just a little. 🙂

    • #982
      Steve
      Keymaster

      @atomworks– This will definitely be fixed in the next beta.

Viewing 5 reply threads
  • You must be logged in to reply to this topic.