ceford / j4xdemos-com-mywalks

Joomla 4 Component Example Code and Tutorial Explanation
26 stars 13 forks source link

Extension XML tag needs some changes #3

Open shoulders opened 4 years ago

shoulders commented 4 years ago
<extension type="component" version="4.0" method="install" client="site">

The version tag is depreceated in 3.x and removed in Joomla 4. see: https://docs.joomla.org/Manifest_files

String that identifies the version of Joomla for which this extension is developed. This is not used in Joomla 3.x and has been removed from Joomla 4.0 and higher.

method="install" should be changed to method="upgrade"

NB: I see from the tutorial this is set to "install" because of a bug the reason for this is becasue when people are testing and changing extensions they will constantly re-install which is what the upgrade option allows whereas the install option will cause the installation to gracefully fail and therefore will not re-install the extension. From what I can see (if my memory is correct) the basic installer routines are the same in Joomla 4 as they are in Joomla 3.

The default value install will be also used if the method attribute is not used. The install value means the installer will gracefully stop if it finds any existing file/folder of the new extension.

Again see: https://docs.joomla.org/Manifest_files

client="site" is only for modules

The client attribute allows you to specify for which application client the new module is available.

Again see: https://docs.joomla.org/Manifest_files

ceford commented 4 years ago

Thank you for these very useful comments. I have changed the code and the tutorial, to which I have added a reference to the article on Manifest Files.