Skip to content

[Chore] Remove Joomla 6 deprecations#201

Merged
Elfangor93 merged 14 commits intoJoomGalleryfriends:v4.1.0from
Elfangor93:j6-deprications
May 29, 2025
Merged

[Chore] Remove Joomla 6 deprecations#201
Elfangor93 merged 14 commits intoJoomGalleryfriends:v4.1.0from
Elfangor93:j6-deprications

Conversation

@Elfangor93
Copy link
Member

@Elfangor93 Elfangor93 commented Apr 30, 2025

This PR removes all Deprecations which are displayed in a Joomla! installation of version 6.0.0-alpha1-dev. This makes JoomGallery 4 fully Joomla 6 compatible and prepares towards Joomla 7 compatibility.

Only deprecations which are not removed are triggerEvent, setError and getError. We should wait until we know how the Joomla Core is threating this deprecations before we implement our own solutions to keep full Core compatibility also in the future.

Related Joomla CMS PRs

Error handling: joomla/joomla-cms#44098
Trigger Events: joomla/joomla-cms#43395

How to test this PR?

With this PR nothing has changed from a users perspective. Everything should work as before.
Ideal would be to have a test from each system (Joomla 4, Joomla 5, Joomla 6).

@Elfangor93 Elfangor93 added needs testing This issue or pull request needs further testing GUI testing Tests can be perfomed using the GUI labels Apr 30, 2025
@Elfangor93 Elfangor93 changed the base branch from master to v4.1.0 April 30, 2025 05:40
@MrMusic
Copy link
Member

MrMusic commented May 1, 2025

Error during installing:

0 Call to undefined method Joomgallery\Component\Joomgallery\Administrator\Table\CategoryTable::getDatabase() 

Call Stack
# 	Function 	Location
1 	() 	JROOT\administrator\components\com_joomgallery\src\Table\CategoryTable.php:475
2 	Joomgallery\Component\Joomgallery\Administrator\Table\CategoryTable->addRoot() 	JROOT\administrator\components\com_joomgallery\src\Table\CategoryTable.php:589
3 	Joomgallery\Component\Joomgallery\Administrator\Table\CategoryTable->getRootId() 	JROOT\administrator\components\com_joomgallery\src\Table\CategoryTable.php:93
4 	Joomgallery\Component\Joomgallery\Administrator\Table\CategoryTable->__construct() 	JROOT\tmp\install_6813407c53892\JoomGallery-j6-deprications\script.php:625
5 	com_joomgalleryInstallerScript->addDefaultCategory() 	JROOT\tmp\install_6813407c53892\JoomGallery-j6-deprications\script.php:459 

Joomla 5.3.0
PHP 8.3.14
MariaDB 10.4.32

@eumel1602
Copy link

ich hätte jetzt gedacht, dass de PR mit J 6 alpha+ getestet werden soll?

@Elfangor93
Copy link
Member Author

Nö, die minimal Anforderungen haben sich nicht geändert. Der PR sollte mit J4, J5 und J6 funktionieren.

@MrMusic
Copy link
Member

MrMusic commented May 2, 2025

Error during installing:

ClassNotFoundError:
in administrator/components/com_joomgallery/src/Table/MultipleAssetsTable.php:27

Attempted to load trait "LegacyDatabaseTrait" from namespace "Joomgallery\Component\Joomgallery\Administrator\Table".
Did you forget a "use" statement for another namespace?

@MrMusic
Copy link
Member

MrMusic commented May 4, 2025

Installation works 👍

Only Image upload does not work:

0 Call to undefined method Joomla\Filesystem\File::exists() 

Call Stack
# 	Function 	Location
1 	() 	JROOT\administrator\components\com_joomgallery\src\Service\IMGtools\IMGtools.php:537
2 	Joomgallery\Component\Joomgallery\Administrator\Service\IMGtools\IMGtools->checkValidImage() 	JROOT\administrator\components\com_joomgallery\src\Service\IMGtools\IMGtools.php:204
3 	Joomgallery\Component\Joomgallery\Administrator\Service\IMGtools\IMGtools->analyse() 	JROOT\administrator\components\com_joomgallery\src\Service\IMGtools\GDtools.php:190
4 	Joomgallery\Component\Joomgallery\Administrator\Service\IMGtools\GDtools->read() 	JROOT\administrator\components\com_joomgallery\src\Service\FileManager\FileManager.php:239
5 	Joomgallery\Component\Joomgallery\Administrator\Service\FileManager\FileManager->createImages() 

@MrMusic
Copy link
Member

MrMusic commented May 6, 2025

New Test with Joomla 5.3.0:
Upload works 👍
In Frontend - Category view:

0 Call to undefined method Joomgallery\Component\Joomgallery\Site\View\Category\HtmlView::getUser() 

Call Stack
# 	Function 	Location
1 	() 	JROOT\components\com_joomgallery\tmpl\category\default_cat.php:124
2 	include() 	JROOT\libraries\src\MVC\View\HtmlView.php:416
3 	Joomla\CMS\MVC\View\HtmlView->loadTemplate() 	JROOT\components\com_joomgallery\tmpl\category\default.php:32
4 	include() 	JROOT\libraries\src\MVC\View\HtmlView.php:416 

in Frontend - Single image view:

Call to undefined method Joomgallery\Component\Joomgallery\Site\View\Image\HtmlView::getUser() 

Call Stack
# 	Function 	Location
1 	() 	JROOT\components\com_joomgallery\tmpl\image\default.php:46
2 	include() 	JROOT\libraries\src\MVC\View\HtmlView.php:416
3 	Joomla\CMS\MVC\View\HtmlView->loadTemplate() 	JROOT\libraries\src\MVC\View\HtmlView.php:204

With Joomla 4.4.13:
in Backend - Control panel:

0 Call to undefined method Joomla\CMS\Document\HtmlDocument::getToolbar() 

Call stack
# 	Function 	Location
1 	() 	JROOT\administrator\components\com_joomgallery\src\View\Control\HtmlView.php:89
2 	Joomgallery\Component\Joomgallery\Administrator\View\Control\HtmlView->addToolbar() 	JROOT\administrator\components\com_joomgallery\src\View\Control\HtmlView.php:74
3 	Joomgallery\Component\Joomgallery\Administrator\View\Control\HtmlView->display() 	JROOT\libraries\src\MVC\Controller\BaseController.php:660
4 	Joomla\CMS\MVC\Controller\BaseController->display() 	JROOT\administrator\components\com_joomgallery\src\Controller\DisplayController.php:118
5 	Joomgallery\Component\Joomgallery\Administrator\Controller\DisplayController->display() 	JROOT\libraries\src\MVC\Controller\BaseController.php:693 

same error in other views:

JROOT\administrator\components\com_joomgallery\src\View\Images\HtmlView.php:83 
JROOT\administrator\components\com_joomgallery\src\View\Categories\HtmlView.php:85 
JROOT\administrator\components\com_joomgallery\src\View\Tags\HtmlView.php:79
JROOT\administrator\components\com_joomgallery\src\View\Configs\HtmlView.php:79 

@Elfangor93 Elfangor93 changed the title Remove Joomla 6 deprecations [Chore] Remove Joomla 6 deprecations May 12, 2025
@MrMusic
Copy link
Member

MrMusic commented May 13, 2025

No errors in Joomla 5.3.0

Joomla 4.4.13
Multiple Upload

0 Call to undefined method Joomla\Filesystem\File::getExt()

Call stack
# 	Function 	Location
1 	() 	JROOT\administrator\components\com_joomgallery\src\Service\Filesystem\Filesystem.php:264
2 	Joomgallery\Component\Joomgallery\Administrator\Service\Filesystem\Filesystem->getExt() 	JROOT\administrator\components\com_joomgallery\src\Service\Uploader\Uploader.php:140
3 	Joomgallery\Component\Joomgallery\Administrator\Service\Uploader\Uploader->retrieveImage() 	JROOT\administrator\components\com_joomgallery\src\Service\Uploader\TUSUploader.php:105
4 	Joomgallery\Component\Joomgallery\Administrator\Service\Uploader\TUSUploader->retrieveImage() 	JROOT\administrator\components\com_joomgallery\src\Model\ImageModel.php:454
5 	Joomgallery\Component\Joomgallery\Administrator\Model\ImageModel->save() 	JROOT\libraries\src\MVC\Controller\FormController.php:676

@MrMusic
Copy link
Member

MrMusic commented May 15, 2025

Joomla 5.3.0 and 4.4.13
Images list view

When trying to change the image status by clicking on the icon or via the toolbar button:

0 Call to undefined method Joomla\CMS\User\UserFactory::get() 

Call stack
# 	Function 	Location
1 	() 	JROOT\administrator\components\com_joomgallery\src\Model\ImageModel.php:971
2 	Joomgallery\Component\Joomgallery\Administrator\Model\ImageModel->changeSate() 	JROOT\administrator\components\com_joomgallery\src\Controller\ImagesController.php:346
3 	Joomgallery\Component\Joomgallery\Administrator\Controller\ImagesController->changeState() 	JROOT\administrator\components\com_joomgallery\src\Controller\ImagesController.php:77
4 	Joomgallery\Component\Joomgallery\Administrator\Controller\ImagesController->feature() 	JROOT\libraries\src\MVC\Controller\BaseController.php:693
5 	Joomla\CMS\MVC\Controller\BaseController->execute() 	JROOT\administrator\components\com_joomgallery\src\Controller\JoomAdminController.php:147 	

When trying to recreate the images files:

0 Call to undefined method Joomla\CMS\User\UserFactory::authorise() 

Call stack
# 	Function 	Location
1 	() 	JROOT\administrator\components\com_joomgallery\src\Model\ImageModel.php:1223
2 	Joomgallery\Component\Joomgallery\Administrator\Model\ImageModel->canRecreate() 	JROOT\administrator\components\com_joomgallery\src\Model\ImageModel.php:1106
3 	Joomgallery\Component\Joomgallery\Administrator\Model\ImageModel->recreate() 	JROOT\administrator\components\com_joomgallery\src\Controller\ImagesController.php:186
4 	Joomgallery\Component\Joomgallery\Administrator\Controller\ImagesController->recreate() 	JROOT\libraries\src\MVC\Controller\BaseController.php:693
5 	Joomla\CMS\MVC\Controller\BaseController->execute() 	JROOT\administrator\components\com_joomgallery\src\Controller\JoomAdminController.php:147 

@Elfangor93
Copy link
Member Author

Elfangor93 commented May 16, 2025

I experience this issue when trying to upload an image in Joomla 6:
joomla/joomla-cms#45484

@MrMusic
Copy link
Member

MrMusic commented May 26, 2025

I can no longer see any problems with my 'basic' tests. But it is also not possible to test everything.
I have tested this item ✅ successfully.
Thank you very much!

@eumel1602
Copy link

All of my basic tests were successful too. ✅
Thanks

J 5.3.1

@Elfangor93
Copy link
Member Author

Then I think we can now merge this PR. This means, JoomGallery is now Joomla 6 compatible and well prepared for Joomla 7.

@Elfangor93 Elfangor93 merged commit 2244460 into JoomGalleryfriends:v4.1.0 May 29, 2025
@Elfangor93 Elfangor93 deleted the j6-deprications branch June 30, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GUI testing Tests can be perfomed using the GUI needs testing This issue or pull request needs further testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants