PHP 7 - Fatal error
Permalink Browser Info Environment
Hi,
i just want to let you know that PHP 7 requires a small modification in controller.php of the EasyImageGallery (1.3.1) block, in oder to avoid fatal errors:
packages/easy_image_gallery/blocks/easy_image_gallery/controller.php
should be:
Best regards,
Michael
i just want to let you know that PHP 7 requires a small modification in controller.php of the EasyImageGallery (1.3.1) block, in oder to avoid fatal errors:
packages/easy_image_gallery/blocks/easy_image_gallery/controller.php
public function registerViewAssets()
should be:
public function registerViewAssets($outputContent = '')
Best regards,
Michael
Type: | Discussion |
---|---|
Status: | In Progress |
Thank you!!!! You're a lifesaver!
You're welcome!
There are even more pitfalls with arguments of some functions in controller.php of some add-ons, when C5 is running on PHP7. Fortunately, the error messages are descriptive enough to let even non-programmers know what has to be changed.
There are even more pitfalls with arguments of some functions in controller.php of some add-ons, when C5 is running on PHP7. Fortunately, the error messages are descriptive enough to let even non-programmers know what has to be changed.
This is still an issue, not a big thing to correct to code.
I used two hours of my life finding out the problem, just before spending 20 bucks.
Please fix.
I used two hours of my life finding out the problem, just before spending 20 bucks.
Please fix.
I gave up on this addon for the above error that still gets generated several months after it was reported! (NOT FIXED)
I also noted that every time the gallery was edited, every image in the gallery was assigned a new file version!
For a site with in excess of 100 users each editing their own gallery with up to 150 images per gallery, the FileVersions table in the database would soon bloat the database..
I also noted that every time the gallery was edited, every image in the gallery was assigned a new file version!
For a site with in excess of 100 users each editing their own gallery with up to 150 images per gallery, the FileVersions table in the database would soon bloat the database..
This doesn´t work with php 7.2
Is there any posibility to fix it. It worked at my space using php 7.1, but not with higher versions. Can anybody help, or will i have to create this parts new?
Is there any posibility to fix it. It worked at my space using php 7.1, but not with higher versions. Can anybody help, or will i have to create this parts new?
It's working fine for me with PHP 7.3.12 and package version 1.3.2
There is no longer a registerViewAssets() function, just registerAssets().
What error are you getting (doesn't work doesn't help).
There is no longer a registerViewAssets() function, just registerAssets().
What error are you getting (doesn't work doesn't help).
This is one of my favorite galleries and I'm happy it is _allmost_ in working order again. Downloaded version 1.4.2 works with C5.8 and PHP7.1, but I have had problems with PHP7.2.
But today I got it working! I followed these instructions:
https://www.concrete5.org/community/forums/usage/concrete5-8.5.2-eas...
https://www.concrete5.org/marketplace/addons/easy-image-gallery/supp...
As suggested <? endif ?> was changed to <?php endif ?> in the following files
packages / easy_image_gallery / blocks / easy_image_gallery / view.php
packages / easy_image_gallery / blocks / easy_image_gallery / templates / basic / view.php
as well as in my own templates.
I think the masonry template was fine...
It also helped to change in
packages / easy_image_gallery / blocks / easy_image_gallery / templates / basic / view.php
Line 26
to
and Line 38
to
That should not mess the file up? And it was giving error...
But today I got it working! I followed these instructions:
https://www.concrete5.org/community/forums/usage/concrete5-8.5.2-eas...
https://www.concrete5.org/marketplace/addons/easy-image-gallery/supp...
As suggested <? endif ?> was changed to <?php endif ?> in the following files
packages / easy_image_gallery / blocks / easy_image_gallery / view.php
packages / easy_image_gallery / blocks / easy_image_gallery / templates / basic / view.php
as well as in my own templates.
I think the masonry template was fine...
It also helped to change in
packages / easy_image_gallery / blocks / easy_image_gallery / templates / basic / view.php
Line 26
<<?php echo $tag ?> class="img ....
to
<a class="img ...
and Line 38
</<?php echo $tag ?>>
to
</a>
That should not mess the file up? And it was giving error...