News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Upload error count Argument must be of type Countable array[Solved]

Started by youp, 15.06.2021 14:28:26

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

youp

Hi!

When I try to upload a file from the frontend, I get this error message: "0 count(): Argument #1 ($var) must be of type Countable|array, null given". I am using


php8.0/MySQL5.7/joomla 3.9.27 /jDownloads Version 3.9.7.3

I found here a similar (in German?) issue due to php version?

Thanks in advance.
  •  

ColinM

Hi
First reaction is  it looks like a PHP version 8 challenge in defining a variable!  Will investigate as so far I have been using PHP v7 series.  But could be a definition in a database field.

Could you please advise  which part of the front end - was it in Creating a new Download or Editting an existing one?
Colin
Colin M
  •  

youp

Hi,
Thanks for the reply!
I tested both: it occurs both in Creating a new Download or Editting an existing one.
  •  

ColinM

Youp
This is a PHP 8 related problem that was also running in another topic.  Specificallyhttp://www.jdownloads.com/forum/index.php?topic=12388.msg46306#msg46306
The solution was to cast a specific variable to an integer
For convenience I have attached the replacement filethe instructions from Arno are
Quoteplease try the (unzipped) attached file. Copy it to \components\com_jdownloads\views\category\
Try it then again and post here your result. Thanks.
Could you please see if that cures the problem otherwise we have another 'challenge'
Colin
Colin M
  •  

youp

Hi Colin,
Thanks and sorry I did not see the mentioned message, do not hesitate to close this one and I will continue on the other if needed.
Unfortunately this does not solved the issue. On the other hand, it might be another error message? Please find attached the exact way the message is delivered: just my top bar menu and a blank page with this.
How can I help with other information?
  •  

ColinM

YuopCould you try this one pleaseAfter unzipping copy the file view.html.php to  \components\com_jdownloads\views\category\
double chech you have categorry not categories
File view.html.php should have at line 316
if ($menu && ($menu->query['option'] != 'com_jdownloads' || $menu->query['view'] != 'category' || $id !== (int) $this->category->id)) {Colin
Colin M
  •  

youp

Hi Colin,

Thanks again for your message!
Unfortunately it did not work. I double checked I am in "category" not "categories". I also reset Options, Categories and Downloads Permissions in the "Tools" panel, without success neither.

Sorry.

What can I do to help solving this issue? This is a fresh install of JDownloads, it is ok if I remove it to reinstall, or change all the needed options.

Best,
There was also another problem in multilingual setup that was not related to the above errorColin
  •  

ColinM

Colin M
  •  

tobias.bucher

Sorry for hijacking / grave digging this, but I have exactly this issue with Joomla 3.10.2, JD 3.9, PHP 8.0.11. Was there a solution for this?







Cheers
  •  

ColinM

Tobias
Yes there is a solution
please try the (unzipped) attached file. Copy it to \components\com_jdownloads\views\category\
Please make sure you use category not categories
If you have a multilingual siter then please let us know
Colin
Colin M
  •