Remove a installed a package that support lang file, and pkg_script.php
on class pkg_XXX uninstall method will be called a JText::_('MESSAGE)
MESSAGE will not traslated
Display, the correct MESSAGE translation (get from pkg_XXX.sys.ini)
MESSAGE will not traslated
Joomla 3.6.5
i wrote this patch and committed on forum.joomla.org
https://forum.joomla.org/viewtopic.php?f=715&t=946981&p=3460994#p3460994
on line 722 of libraries/cms/installer/installer.php
// Add the languages if installed with package
if ($type === 'package')
{
if ($this->extension->load($identifier,null))
{
$lang = JFactory::getLanguage();
$lang_tag = $lang->getTag();
if (!$lang->load($this->extension->element.'.sys',JPATH_SITE,$lang_tag))
{
$lang->load($this->extension->element.'.sys',JPATH_SITE);
}
}
}
--
Agostino Zanutto
SFS.it
Labels |
Added:
?
|
@Bakual Sorry it's my first time :D
Reading code of 3.7 on line 722 of the same file there is a comment that explain that "adapter" will translate language... and there isnt loaded.
https://github.com/joomla/joomla-cms/blob/3.7.x/libraries/cms/installer/installer.php#L722
Later I try to create a devel host 3.7 based and I'll see if the issue die on 3.6.5.
Have a good day.
Category | ⇒ | Language & Strings |
@infograf768 can you have a Look for a PR?
Priority | Medium | ⇒ | Very low |
Status | New | ⇒ | Confirmed |
I would need an extension which has such a script to test.
@franz-wohlkoenig you fixed it on 3.6.5 or 3.7?
I can build an extension dedicated if you need for it.
@sfs-it @infograf768 was asking for an Extension, guessing 3.7
Gimme 20' and I build one for testing.
@franz-wohlkoenig
I placed 2 empty install packages.
fist one is for a system plugin => https://www.sfs.it/downloads/J36-plg_system_testing_uninstall_demo.zip
second is a template => https://www.sfs.it/downloads/J36-tpl_testing_uninstall_demo.zip
both had all events enabled on script.php.
Template uninstall dont generate any script.php call on 3.6.5.
Attachments:
J36-plg_system_testing_uninstall_demo.zip
J36-tpl_testing_uninstall_demo.zip
@infograf768 can you please have a look above?
I fail to understand the issue as well as the code proposed.
The proposed plugin (its type is NOT package
but plugin
) installs/uninstalls OK and the uninstall message displays OK, i.e., as I changed the string
PLG_SYSTEM_TESTING_UNINSTALL_DEMO_UNINSTALL_TEXT="Uninstallation went perfectly"
this without the patch.
It does not work for the template with or without patch, no message at all, but I guess this may be due to your code rather than core.
The template install adapter is only on the standardized install path. So install actions should trigger the scriptfile.
The uninstall path will be fixed in 4.0. Mainly because standardizing all of that for all of the adapters will most require B/C breaks in the system internals.
Sorry... I create pkg, gimme 10'
Here there are the pkg
J36-pkg_testing_uninstall_demo.zip
@mbabker has replied to you above:
#14087 (comment)
Right. The install path was standardized in 3.4. The uninstall path hasn't yet, and as such each extension adapter still has different behaviors.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-29 17:50:46 |
Closed_By | ⇒ | brianteeman |
Since you already have code proposed, can you please make a PR so it can be reviewed and tested?
See https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests for some guidance how to create a PR