JoomGalleryfriends / JG4-dev

Development repository for JoomGallery v4.x
GNU General Public License v3.0
10 stars 6 forks source link

Update control panel #149

Closed MrMusic closed 10 months ago

MrMusic commented 11 months ago

Changes: Fixes for Joomla 5 Show available extensions (JG3) Control Panel design changes

$this->addMailTemplate does not work in Joomla 5. @Elfangor93 Do you have any suggestions for this?

Elfangor93 commented 11 months ago

Here I listed the most important deprecations introduced in Joomla 4.3: http://wiki.tech.spuur.ch/joomla/framework/deprecations

Elfangor93 commented 11 months ago

$this->addMailTemplate does not work in Joomla 5.

I guess you refer to the addMailTemplate method in the script.php? What exactly is the error message you get there? Because there is a Factory::getDbo(); in this method too. Maybe that's the problem?

MrMusic commented 11 months ago

The error is 0 class_exists(): Argument #1 ($class) must be of type string, Joomla\Component\Mails\Administrator\Table\TemplateTable given and occurs in line 461 of script.php. The change to $db = Factory::getContainer()->get(DatabaseInterface::class); has no effect here.

Elfangor93 commented 11 months ago

The error is 0 class_exists(): Argument #1 ($class) must be of type string, Joomla\Component\Mails\Administrator\Table\TemplateTable given and occurs in line 461 of script.php.

Change the code to the following and the error is gone: grafik

MrMusic commented 11 months ago

@Elfangor93 Thank you. Error fixed.

MrMusic commented 11 months ago

New error: When editing an image, the following error occurs: 0 Joomla\CMS\Form\Field\EditorField::filter fieldimgtextcalls a deprecated filter class JComponentHelper, the class needs to be namespaced use \Joomla\CMS\Component\ComponentHelper instead or activate the backward compatible plugin.

I have now changed the filter in the image, category and tag xml from filter="JComponentHelper::filterText" to filter="\Joomla\CMS\Component\ComponentHelper::filterText" I hope this is correct.

MrMusic commented 11 months ago

After installing the JoomGallery, the 'start' and the 'languages' buttons appear. Is the 'languages' button still necessary? Normally the languages are listed together with the all other extensions in the Control Panel.

Elfangor93 commented 11 months ago

I have now changed the filter in the image, category and tag xml from filter="JComponentHelper::filterText" to filter="\Joomla\CMS\Component\ComponentHelper::filterText" I hope this is correct.

Yes, this seems to be correct. At least Joomla 5 is doing the same in the core ... grafik

Elfangor93 commented 11 months ago

After installing the JoomGallery, the 'start' and the 'languages' buttons appear. Is the 'languages' button still necessary?

No, I dont think so. I just copied that from JG3.

MrMusic commented 11 months ago

For testing I have adapted the Quickicon plugin for Joomla 4 and put it up as available extension for download. In the upper area of the control panel you could remove the white background, then it looks like this: control-panel-transparent Better or leave it white??

rowi68 commented 11 months ago

Upper area looks better now...

MrMusic commented 11 months ago

Instead of displaying the defined image top lists above the news area, i set now a link to the image manager. The image manager already provides all necessary functions to sort the images by any criteria. This saves a lot of code in the HtmlView.php. The demand number of images to be displayed is no longer necessary. The statistic and the info area are now a bit extended. From my side the PR is now finished. Are there still change requests?

MrMusic commented 10 months ago

Last change: link text to be similar to the Joomla core

AlexanderSupp commented 10 months ago

I installed this PR in my Joomla 5.0 JoomGallery 4 Test System with a concept for documentation. http://joomgallery4.fotofreunde-much.de Everything works fine, and the “Control Panel” looks good. Before, I changed my Joomla 4.4 to 5.0 with a difficult process. The reason was, that my provider has not the recommanded database version. So I changed from MySQL to MariaDB. See https://www.joomla.de/joomla/anforderungen

However, this PR is ready to merge into main as early as possible.. Thanks.