No Code Attached Yet
avatar sonvnn
sonvnn
4 Dec 2023

Steps to reproduce the issue

  1. Add this code echo Joomla\Filesystem\File:getExt('name.jpg'); to your code in Joomla 4.4
  2. Go to front-end see issue

Expected result

Return jpg in front-end

Actual result

Call to undefined method Joomla\Filesystem\File:getExt()
287413316-217cfc8e-bd98-4180-b439-37fb28a69712

System information (as much as possible)

Joomla 4.4.x

Additional comments

avatar sonvnn sonvnn - open - 4 Dec 2023
avatar joomla-cms-bot joomla-cms-bot - change - 4 Dec 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Dec 2023
avatar toivo
toivo - comment - 4 Dec 2023

The actual result is expected behaviour. Use Joomla\CMS\Filesystem\File instead.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42460.

avatar sonvnn
sonvnn - comment - 5 Dec 2023

@toivo Yes I know it. But Use Joomla\CMS\Filesystem\File will be deprecated in J6. So I don't want to use it.
Screen Shot 2023-12-05 at 08 58 04

avatar toivo
toivo - comment - 5 Dec 2023

Your method seems to be available in Joomla 5.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42460.

avatar joomdonation
joomdonation - comment - 24 Feb 2024

It would be nice if the method can be backported to be available on Joomla 4.4.x. But as I know, this is not possible with our policy.

So for the time being, I think you will need to use Joomla\CMS\Filesystem\File as @toivo suggested and replace it with Joomla\Filesystem\File when you can drop support for Joomla 4.

avatar alikon alikon - close - 25 Feb 2024
avatar alikon alikon - change - 25 Feb 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-02-25 06:55:39
Closed_By alikon
avatar alikon
alikon - comment - 25 Feb 2024

closing as per explanation given

Add a Comment

Login with GitHub to post a comment