• Resolved meinService

    (@meinservice)


    ERROR breaks my WordPress complete
    $notices = Notices::getInstance();

    (u dont use $notices in the functionm why u call it?)

    public function plugin_actions()
    {
    $this->plugin_path = plugin_dir_path(EMR_ROOT_FILE);
    //$this->plugin_url = plugin_dir_url(EMR_ROOT_FILE);

                // loads the dismiss hook.
                $notices = Notices::getInstance();
    
      // init plugin
        add_action('admin_menu', array($this,'menu'));
                add_action('submenu_file', array($this, 'hide_sub_menu'));
    
                add_action( 'current_screen', array($this, 'setScreen') ); // annoying workaround for notices in edit-attachment screen
        add_action('admin_enqueue_scripts', array($this,'admin_scripts'));
    
    
      // content filters
        add_filter('media_row_actions', array($this,'add_media_action'), 10, 2);
        add_action('attachment_submitbox_misc_actions', array($this,'admin_date_replaced_media_on_edit_media_screen'), 91);
    
      // notices
    
      // editors
        add_action('add_meta_boxes_attachment', array($this, 'add_meta_boxes'), 10, 2);
        add_filter('attachment_fields_to_edit', array($this, 'attachment_editor'), 10, 2);
    
      /** Just after an image is replaced, try to browser decache the images */
        if (isset($_GET['emr_replaced']) && intval($_GET['emr_replaced'] == 1)) {
            add_filter('wp_get_attachment_image_src', array($this, 'attempt_uncache_image'), 10, 4);
    
          // adds a metabox to list thumbnails. This is a cache reset hidden as feature.
          //add_action( 'add_meta_boxes', function () {  );
            add_filter('postbox_classes_attachment_emr-showthumbs-box', function ($classes) {
                $classes[] = 'closed';
                return $classes;
            });
        }
    }


Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Adrian

    (@adrianrus)

    Hello @meinservice ,

    Thank you for your message and sorry to hear about this issue 🙁

    This is really strange! Could you please confirm if you encountered this issue with the previous version too or it just started happening with 4.2.2?

    Looking forward to your reply so we can investigate this in more detail!

    All the best,

    Thread Starter meinService

    (@meinservice)

    Yes, definitely after 4.2.2 since this morning.
    First Solution for me now: comment the row.

    //$notices = Notices::getInstance();
    Thread Starter meinService

    (@meinservice)

    Testing:

    After comment, again WordPress is running
    After erase comment, WordPress is running too

    My conclusion, the error only comes one times, first call the website, but with hard break

    Plugin Support Adrian

    (@adrianrus)

    Thank you for letting us know about this, we will continue investigating this on our end!

    Thread Starter meinService

    (@meinservice)

    Waiting for new Version, using this $notices inside the function

    Plugin Author Pedro

    (@petredobrescu)

    Hello @meinservice,

    Since this error only appeared for you upon activation of the new version, we need the full error, including the stack trace, to understand what is going on. Do you still have it in your logs?

    The $notices is just an init for the NoticeController class, and normally, it should not affect anything or generate an error.

    Thread Starter meinService

    (@meinservice)

    Sorry, in dont have logs of what happens, only the white Screen and DIE – Message. But after that, the error again dont appears

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.