News:

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

Main Menu
Support-Forum

Error: Call to a member function getTag() on null - Proposal for a fix attached

Started by baba, 18.09.2026 11:13:49

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

baba

I use jDownloads on an existing site I support and I like it very much. But i got an issue all sudden!

jDownloads Version 4.1.7 Stable - Date: 2026-07-24
Joomla: 6.13
PHP 8.3.33

I performed a test scan and got this result:

Monitoring Log
==================================================
Date: Friday, 18 September 2026 02:24
Test Run Results
==================================================

Searching for new Directories
Checked Directories: 8
No new Directories found.
Searching for new Files
Checked Files: 1293
New File found:  → acs_archive/alphas_crazy_sounds-2026-09-17.mp3
COM_JDOWNLOADS_ERROR_RESULT_MSG: ✗ acs_archive/alphas_crazy_sounds-2026-09-17.mp3: Call to a member function getTag() on null
No new Files found.
Checking all published Categories
All published Category Directories exist.
Checking all published Downloads
All published Downloads exist.
✓ Check complete!
The scan duration: 16.75 seconds.
Number of starts: 53
max_execution_time: 30
memory_limit: 128

So the final scan is NOT successful.

Any help is highly appreciated!

NB: i performed DB check & mount check without any issues!
  •  

ColinM

Hi
Actually I think the scan has successfully - it identified a file that is not yet been made into a Download or there is a missing category. Did you use the Files method to upload and create Downloads? If it is a large file then it may take a little while.
ColinM
Colin M
  •  

baba

Quote from: ColinM on 18.09.2026 11:39:47Hi
Actually I think the scan has successfully - it identified a file that is not yet been made into a Download or there is a missing category. Did you use the Files method to upload and create Downloads? If it is a large file then it may take a little while.
ColinM

Hello Collin, thanks for you quick aswer. To clear things up a little:

My Downloads are uploaded to a SeaFile instance by the DJs. I then copy the files to the proper directory (Wasabi mounted). Then i perform the JDownload scan (Test first) and fill the details & publish the Download. I did it

I checked the existence & checksum of the file => OK. Until today it worked this way for almost 12k of Downloads!

Cheers
Baba


  •  

ColinM

Baba,
Thanks for extra info. I now understand that Seafile is a cloud based file sharing and syncing platform. I am not familiar with it !!
I understand you have around 12,000 Downloads. Could you outline how you then make the file into a Download please.
Is it by using the External File Link in Add Download? And do you have to set the Creation Date?
ColinM
Colin M
  •  

baba

Quote from: ColinM on 18.09.2026 14:18:12Baba,
Thanks for extra info. I now understand that Seafile is a cloud based file sharing and syncing platform. I am not familiar with it !!
I understand you have around 12,000 Downloads. Could you outline how you then make the file into a Download please.
Is it by using the External File Link in Add Download? And do you have to set the Creation Date?
ColinM

Hey Colin,

i try to explayn as good i can :D
- DJ's are uploading the DJ-Set via Seafile to their repo.
- I am checking the files and add additional stuff like id3 tags etc.
- if all done i copy the file into my JDownloads file structure (var/www/jdownloads/dj_abc e.g)
- After that i am performing the JDownloads scan  & add files and details as needed

Additional Information:

I have a dev-system (restore of my prod joomla)
I performed a scan for new files with success! - All new files found & added!

So i performed a backup and wnat to restore this Backup on my broken Prod system, but got this Joomla error:

An error has occurred.

0 Joomla\Filesystem\File::upload: File not uploaded for security reasons!

I think if i would be able to restore the backup file (.txt) the issue would be gone!

Baba
  •  

baba

Hello Colin,

because the strange/unpredicable behaviour of Joomla, i changed my workflow to have a working solution.

So it is now:

1. DJ is uploading to my Seafile instance (as before)
2. I'm doing the needed pre-processing (id3tags, naming etc.) (as before)
3. The processed file goes to the JDownloads upload folder (changed step)
4. I am adding the file to the proper category & add details (as before)

Thanks again for your help!
Cheers
Baba


  •  

ColinM

Hi Baba
That sounds a good procedure
ColinM
Colin M
  •  

baba

Hello Colin,
i am still having issues with the scan!  Let's assume i added images (covers) in the DJ directories.
The test run gives OK. After that i get the error(s)

Test run:
New File found: → acs_archive/cover.jpg
New File found: → acs_archive/cover.jpg
New File found: → paracontrol_archive/cover.jpg
New File found: → pluzminuz_archive/cover.png
New File found: → tsy_archive/cover.jpg
4 New File(s) were found and could be added to the database as Downloads.

Real run:
New File found: → pluzminuz_archive/cover.png
COM_JDOWNLOADS_ERROR_RESULT_MSG: ✗ pluzminuz_archive/cover.png: Call to a member function getTag() on null
New File found: → tsy_archive/cover.jpg
COM_JDOWNLOADS_ERROR_RESULT_MSG: ✗ tsy_archive/cover.jpg: Call to a member function getTag() on null
No new Files found.
Checking all published Categories
All published Category Directories exist.
Checking all published Downloads
All published Downloads exist.

So there is still a bug in place! Maybe anybody fixed this behavior?!

Cheers
Baba
  •  

baba

Maybe the script
scan-worker.php

is the cause?!


scan-worker.php:                    $log_msg = Text::_('COM_JDOWNLOADS_ERROR_RESULT_MSG' . ': ✗ ' . $folder . ': ' . $result['error']);
scan-worker.php:                    $log_msg = Text::_('COM_JDOWNLOADS_ERROR_RESULT_MSG' . ': ✗ ' . $file_path_rel . ': ' . $result['error']);

  •  

baba

Quote from: baba on 05.10.2026 17:20:30Maybe the script
scan-worker.php



is the cause?!


scan-worker.php:                    $log_msg = Text::_('COM_JDOWNLOADS_ERROR_RESULT_MSG' . ': ✗ ' . $folder . ': ' . $result['error']);
scan-worker.php:                    $log_msg = Text::_('COM_JDOWNLOADS_ERROR_RESULT_MSG' . ': ✗ ' . $file_path_rel . ': ' . $result['error']);





Meanwhile i decided to ask my fav. AI to analyze the script and probably find the reason for the errors. I think the AI found a solution (tested on my Joomla). If you have a need for it - feel free to evaluate!  8) - just rename the attached file and place it in
/var/www/administrator/components/com_jdownloads/helpers


  •  

Arno

Hi Baba,
thank you for investigating this and sharing your proposed fix.

I have tested the scan and actual file import with both the published 4.1.7 release on our demo site and our current 4.1.8 development version. In these tests, the files were added successfully without the `getTag()` error. This does not rule out a problem specific to your installation.

Your language-initialization change is plausible, and the additional error details and clearer failure reporting are useful suggestions. However, since the attached script contains several changes, we cannot yet establish which change resolved the issue on your site.

With 4.1.8 nearing release, I have recorded these suggestions for a separate follow-up rather than incorporating the complete replacement script at this stage.

Once 4.1.8 is available, please test it on a backed-up test copy without replacing its scan worker with your modified version. If the error persists, please send the full error details, especially the file and line number where `getTag()` fails.

Thanks again for your contribution and patience.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  
    The following users thanked this post: baba