Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2108

General Questions/New to Joomla! 4.x • Re: Property 'name' of argument 'item' of event onFetchMediaItem has a wrong item. Valid: non empty string

$
0
0
I faced the same problem today when I was uploading couple of files.
Four files were uploaded just fine but fifth file failed with the same error.
After debugging it, I noticed that the file name is not retrieved correctly in administrator/components/com_media/src/Controller/ApiController.php function postFiles.
Output of the line
$name = $content->getString('name');
is empty even when the raw contents of the json show that the filename is present in the json:
{"07ee3357912d99857ba2f76efae0354b":"1","name":"file5.jpg","content":"/9j/4AAQSkZJRgABAgAAAQABAAD/

On succeeding file the last chars of the raw json are =="} but on failing file the json is not correctly terminated.
I tried this two browsers with same results.

Joomla! 4.4.3
PHP 8.1.27

Statistics: Posted by jytky — Sat Mar 16, 2024 9:38 am



Viewing all articles
Browse latest Browse all 2108

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>