avatar HLeithner
HLeithner
20 Nov 2020

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

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar HLeithner HLeithner - open - 20 Nov 2020
avatar bayareajenn
bayareajenn - comment - 20 Nov 2020

So...

  1. Weblinks won't install from the Install from Web tab in com_installer in PHP8. It will install from package file.

  2. Create category. Then create some weblinks.

  3. Create Menu Items for any type of Weblinks menu item type and they throw the errors Harald mentioned above.

avatar alikon
alikon - comment - 21 Nov 2020

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.

avatar HLeithner
HLeithner - comment - 21 Nov 2020

does other extensions work? I test 2 other extensions without problems so I'm not sure if it's weblinks or joomla

avatar alikon
alikon - comment - 21 Nov 2020

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

avatar bayareajenn
bayareajenn - comment - 21 Nov 2020

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.

avatar kcasarez
kcasarez - comment - 21 May 2021

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:

Line 17:

Old:
$params = &$this->item->params;
New:
$params = null;
if (property_exists($this,"item")){ $params = &$this->item->params; }

Line 131-132 (Original, 132-133 after previous change):

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); ?>


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/weblinks/429.

avatar joomdonation joomdonation - change - 18 Aug 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-08-18 08:41:27
Closed_By joomdonation
avatar joomdonation joomdonation - close - 18 Aug 2021
avatar joomdonation
joomdonation - comment - 18 Aug 2021

With the recent commits, the two reported issues are fixed. So I'm closing this.

avatar rotech1
rotech1 - comment - 1 Sep 2022

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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/weblinks/429.

avatar rotech1
rotech1 - comment - 1 Sep 2022

( Error: 0 - Attempt to modify property "params" on null )


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/weblinks/429.

avatar Kikokuko
Kikokuko - comment - 1 Feb 2023

Confirming: Since my IP upgraded to PHP8.0 Weblinks reports error

"#0 Attempt to assign property "tagLayout" on null"


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/weblinks/429.

Add a Comment

Login with GitHub to post a comment