Closed HLeithner closed 3 years ago
So...
Weblinks won't install from the Install from Web tab in com_installer in PHP8. It will install from package file.
Create category. Then create some weblinks.
Create Menu Items for any type of Weblinks menu item type and they throw the errors Harald mentioned above.
i can confirm
Weblinks won't install from the Install from Web tab in com_installer in PHP8. It will install from package file.
nor from install from URL
with Error Unable to detect manifest file.
does other extensions work? I test 2 other extensions without problems so I'm not sure if it's weblinks or joomla
i've installed Akeeba Backup Core 7.4.0.1 (2020-11-18), and despite
PHP version 8.0 is newer than this software supports
seems to work
I installed two other extensions (Akeeba and JCE) via the Install from Web tab without issues. I agree with @alikon that I too got the message with Akeeba that 8.0 is newer than the software supports. JCE installs and displays but some functionality doesn't work presumably because it isn't ready for 8.
So I think the issue is with Weblinks and not with Install from Web.
@HLeithner
Here a Call Stack from German forum: https://forum.joomla.de/thread/13254-fehlermeldung-bei-aufrufen-von-kategorien-bei-addon-weblinks/?postID=83873#post83873
It appears Weblinks is trying to use the property "item", which is not defined for WeblinksViewCategory. I updated a few lines to change $this->item to $item, as they're contained in a for loop that iterates across all the links in the category. Also had to put in an If test to get around a $this->item reference outside of the loop. My only use case is displaying the links in a category, so I can't promise this is an absolute fix for all use cases. Apply these changes at your own risk, and make a backup copy of modified files so you can fall back to standard if it breaks other things.
In components/com_weblinks/views/category/tmpl/default_items.php I made the following changes:
Old:
$params = &$this->item->params;
New:
$params = null;
if (property_exists($this,"item")){ $params = &$this->item->params; }
Old:
<?php $this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($tagsData); ?>
New:
<?php $item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
<?php echo $item->tagLayout->render($tagsData); ?>
With the recent commits, the two reported issues are fixed. So I'm closing this.
I get this on a couple of Joomla 3.10.11 main menu items now ( just a couple, everything else is fine)... Just testing migration to PHP8
( Error: 0 - Attempt to modify property "params" on null )
@rotech1 Could you please let us know exactly what we need to do to see that error? I just tested all menu item types of weblinks extension on Joomla 3.10.11 and PHP 8.1.9 and could not see the error you mentioned.
Sorry - false alarm, not weblinks specific - it was caused by J3.10.11 menu only when type Category -list (CAtegory - blog &etc are fine...), tracked it down to old Gantry used by our template!
@ergotone Ah, OK. Thanks for the update. I'm glad it is not a weblinks problem.
Confirming: Since my IP upgraded to PHP8.0 Weblinks reports error
"#0 Attempt to assign property "tagLayout" on null"
@Kikokuko What Joomla and Weblinks version you are using? Could you please let us know step by step what we need to do to see the issue ourself?
Errors are: 0 count(): Argument #1 ($var) must be of type Countable|array, null given /components/com_weblinks/models/categories.php:95
0 Attempt to modify property "params" on null /components/com_weblinks/views/category/tmpl/default_items.php:17