Please HELP: Can't edit my site - See error message below.

Permalink
Declaration of Concrete\Package\EzPreview\Block\EzPreview\Controller::registerViewAssets() should be compatible with Concrete\Core\Block\BlockController::registerViewAssets($outputContent = '')

adkanforadio
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi adkanforadio,

The issue is likely that you are running PHP 7 and the add-on is not compatible with it.
https://documentation.concrete5.org/developers/assets/requiring-an-a...

I recommend creating an add-on support ticket regarding this.
https://www.concrete5.org/marketplace/addons/ez-preview/support...

The issue appears to be in the block controller on line 60:
public function registerViewAssets() {
   $this->requireAsset('javascript','ezpreviewer');
}

This should be:
public function registerViewAssets($outputContent = '') 
{
   $this->requireAsset('javascript','ezpreviewer');
}
adkanforadio replied on at Permalink Reply
adkanforadio
You're right. I'm intending to upgrade to version 8 which requires php 6
and above; so I upgraded my server to php 7. and the issue begun.
adkanforadio replied on at Permalink Reply
adkanforadio
Thanks for the help and quick response. I've edited as you prescribed and all is working now.
bjalexander replied on at Permalink Reply
bjalexander
Thank you! Exactly the right fix for a different add-on with the same issue.