php7 issues?
PermalinkDeclaration of Concrete\Core\Permission\Access\EditPagePropertiesPageAccess::save($args) should be compatible with Concrete\Core\Permission\Access\Access::save()
I have no idea where this is coming from or where I might look to fix, ort why this is happening.
Sorry for the cluelessness, but any feedback would be helpful. thanks
Declaration of Application\Attribute\ImageFile\Controller::exportValue(Application\Attribute\ImageFile\SimpleXMLElement $akv) should be compatible with Concrete\Core\Attribute\Controller::exportValue(SimpleXMLElement $akv)
then I changed Application\Attribute\ImageFile\Controller::exportValue from
public function exportValue($akv)
to
public function exportValue(\SimpleXMLElement $akv)
or, in some cases, just commenting out the entire registerViewAssets() in my own blocks (as registerViewAssets() was causing the crash in a few places)
Regarding registerViewAssets(), my code was
public function registerViewAssets() { $this->requireAsset('swfobject'); }
but the core registerViewAssets() was
public function registerViewAssets() { }
I thought this would break videos, but it seems to have no negative effect on the videos. hmm... no idea
Can you list the steps required to recreate the errors, please.
make the necessary minimal changes to install a a new block type.
go to Stacks & Blocks->Block Types and you get the error
comment out registerViewAssets() in application/blocks/youtube_test.php and it works
...
PHP7 is not supported by ionCube and Zend Guard Loader yet.
Please check the following thread for more information about ionCube loaders for PHP7:
http://forum.ioncube.com/viewtopic.php?p=10733...
As neither concrete5 or its add-ons encrypt PHP, I doubt that it would be needed.
Instead of
public function registerViewAssets() { ...
it may need to be
public function registerViewAssets($outputContent = '') { ..
I've not actually hit this problem myself, I think it might be to do with a particular recent version of concrete5, where it's been then fixed.
Looking through the core, all registerViewAssets calls appear in this format, so I'm thinking it doesn't hurt to have it the same.
So this particular issue might not be a PHP7 one. Someone else might be able to shed more light on it.
public function registerViewAssets($outputContent = '') { $this->requireAsset('swfobject'); }
the error did not appear.
thanks
I'm hoping this has been fixed in the most recent release, otherwise it's a bit of a dangerous issue - the official docs don't mention that that parameter is required.
Some Add-Ons are causing fatal errors in PHP 7 environments, which can break the hole site!
As mentioned above, the solution is to open:
packages/[name_of_package]/blocks/[name_of_block]/controller.php
search for:
public function registerViewAssets()
and change it to:
public function registerViewAssets($outputContent = '')
Examples:
Easy Image Gallery 1.3.1
Honest Websites Back To Top 0.9.4
Concrete5.7.5.6, PHP 7
I recommend contacting add-on developers directly when you find that their add-ons requires the updated code. This should quickly reduce the number of add-ons with the outstanding issue.
I think all add-on developers should consider updating their products if necessary in order to avoid problems with PHP 7.
public function validate()
which should be:
public function validate($args)
in order to work properly in PHP 7.
Example: Whale Grid Gallery 2 v.2.0.0
I was experiencing the same issue with Whale Bootstrap Carousel in C5 8.1 and fixed by changing
/packages/whale_bootstrap_carousel/blocks/whale_bootstrap_carousel/controller.php
line 367
public function validate() {
to
public function validate($args) {
as per your suggestion
I ran into this problem after PHP had to be upgraded. Several sites broke but they were easy to fix with your tip!
Each version of concrete5 improves support for PHP 7. I recommend using the latest 5.7.5.6 release.