Closed Elfangor93 closed 6 months ago
I have tried the upgrate with this PR. The JG3 tables were renamed correctly. Unfortunately the default entries are missing in the new database tables.
OS: Windows PHP 8.0.28 MariaDB 10.4.28
Unfortunately the default entries are missing in the new database tables.
Yes, I have excluded this, because i didn't know how I want to solve this with the upgrade script. But now I know and we can include it.
2 errors during installation:
0 Resource 'DatabaseInterface' has not been registered with the container.
and
0 Resource 'LanguageFactoryInterface' has not been registered with the container.
Reason:
use \Joomla\Database\DatabaseInterface;
and
use \Joomla\CMS\Language\LanguageFactoryInterface;
is missing.
Addition:
I have fixed the two errors mentioned above and tried an update from the JG 3.6.
The following message appears:
Then the joomgallery_categories is completely empty, no 'root' or 'uncategorised' entry.
But the default configuration is present.
Reason: use \Joomla\Database\DatabaseInterface; and use \Joomla\CMS\Language\LanguageFactoryInterface; is missing.
The two missing use stamenets are now in and the errror should be solved.
The two missing use stamenets are now in and the errror should be solved.
Thanks.
Sorry, another error still appears:
0 Call to undefined method Joomla\CMS\Language\CachingLanguageFactory::getTag()
in line 233 of script.php
Changing line 232 to
$language = Factory::getLanguage();
solves the error for me.
Factory::getLanguage()
is deprecated and will be removed in Joomla 6.
If the approach with the DI Container does not work we could try with $app->getLanguage()
If the approach with the DI Container does not work we could try with $app->getLanguage()
Yes, $app->getLanguage()
works.
Now I make a test upgrade from Joomla 3.10.12 to Joomla 4.4.0 Procedure:
Successfully performed Joomla upgrade to 4.4.0.
Current branch 'script-uninstallModules' installed via the extension manager of Joomla.
Messages see screenshot
After the installation attempt: The folder 'com_joomgallery' in administrator/components is no longer exist In the Database the old joomgallery tables are present with the extension '_old' In the Database are no new tables from the JoomGallery 4 exist
Then second try to install the current 'script-uninstallModules' Branch
Messages see screenshot
Installation now overall successful, but In the Database the old tables now have 2x the extension "_old", e.g. "#joomgallery_old_old" and the new table #categories does not contain root category.
Question: When this PR fixed this error can I then directly upgrade to JG4 from Joomla 3.10 to Joomla 5.0, or must I proceed Joomla 3.10 to Joomla 4.4 and then from Joomla 4 to Joomla 5?
...can I then directly upgrade to JG4 from Joomla 3.10 to Joomla 5.0...
No, first you have to migrate to Joomla 4.4, See https://docs.joomla.org/Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step
With Joomla 5 (or better PHP 8.2) there are still some issues everywhere in the code. Therefore up until now please use the JG4 only up until Joomla 4.4 and up until PHP 8.1.
Found the problem to this error:
Since Joomla 4.4 and Joomla 5.x there is a change in the behavior of File::delete() depending if you use it as Joomla\CMS\Filesystem\File::delete()
or Joomla\Filesystem\File::delete()
. This is why in Joomla 5 and Joomla 4.4.x the installer script does not work anymore...
https://github.com/joomla/joomla-cms/pull/40257#issuecomment-1848936871
It has to be discussed how to solve this issue...
Now also this error is fixed
@MrMusic Can you give this a last check?
Error is fixed! After upgrade from Joomla 3.10.12/JoomGallery 3.6.2 this PR is installable and the default category was created correctly. I have tested this item ✅ successfully. Thank you very much.
Upgrade from JG3 to JG4 created an error, when script tries to uninstall modules during the upgrading process. Line 180 of script.php
$this->uninstallModules(array('mod_joomgithub'));
throws an error because it tries to call methodchildren()
on variable type array.Thanks @csoscd for reporting this issue.