Tagged: ,

Viewing 3 reply threads
  • Author
    Posts
    • #1590
      taishiziyi
      Member

      I am currently working on a site for a client and migrating content over for them from their previous (non-WordPress) site. As I copy over the posts I then go to the “All Posts” screen and, from the list choose “Quick Edit” and update the date and time of the post publication to match when it was originally posted on the previous site.

      When I do this I get the following error: “Notice: Trying to get property of non-object in /vagrant/web/wp-content/plugins/piklist/includes/class-piklist-cpt.php on line 439”

      Screenshot

      The really strange part is twofold:

      1) This is not a custom post type, it is a simple, regular WordPress post, and

      2) When I refresh the screen the error goes away and the new publication date and time are shown correctly.

      I’m not sure what could be causing this, but I wanted to bring this strange bug to your attention.

    • #1598
      Steve
      Keymaster

      We were able to reproduce and think we have it fixed:
      -Open /includes/class-piklist-cpt.php in a code editor.
      -replace the post_row_actions function with this code:

        public static function post_row_actions($actions, $post)
        {
          global $current_screen;
      
          if(isset($current_screen))
          {    
            if (isset(self::$post_types[$current_screen->post_type]) && isset(self::$post_types[$current_screen->post_type]['hide_post_row_actions']))
            {
              foreach (self::$post_types[$current_screen->post_type]['hide_post_row_actions'] as $action)
              {
                unset($actions[$action == 'quick-edit' ? 'inline hide-if-no-js' : $action]);
              }
            }    
          }
      
          return $actions;
        }

      Let us know if that fixed the issue for you.

    • #1655
      mcmaster
      Member

      Thanks, Steve, this fixed the problem for me as well.

      Donna

    • #1656
      Steve
      Keymaster

      We just released v0.9.3.2 which contains this fix so it’s safe for you to update.

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