-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite installation plugins and add them to Hathor #10450
Conversation
I have tested this item ✅ successfully on 15e1931 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10450. |
@@ -18,58 +18,39 @@ | |||
class PlgInstallerFolderInstaller extends JPlugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Bakual Can you fix the double space here as well to a single space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing 😄
I have tested this item ✅ successfully on 15e1931 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10450. |
Almost but not quite. In Hathor you dont get any notice (Otherwise everything else is good) This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10450. |
@brianteeman Good point, I actually did want to check that but must have looked at the wrong place. I checked again but it is the JED Installer that I saw. Thanks for pointing this out. |
I have tested this item 🔴 unsuccessfully on 15e1931 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10450. |
This PR has received new commits. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10450. |
This PR has received new commits. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10450. |
Good catch. Added that message now as well to Hathor. |
I have tested this item ✅ successfully on 49e416a This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10450. |
I have few doubts regarding this:
|
@izharaazmi JForm isn't used because I don't see the added value here as all we need is an input field. With what would you want to extend the form? You are better off writing your own installation plugin. I think it is really overkill. You are a little late to the party as to why the plugin is triggered there. It has been there since the introduction of Install from web. I would even argue, how is this different from doing for example $form->renderInput('fieldname'); |
The way the plugins currently work (including the install from web) it wouldn't be possible to move the call to the view. The plugins directly generate output. |
Fine if it was so. But you and I and we are working on improvements, right? After all we are going to have a major release. I also want to implement the ability to the installer plugins to perform their own install routine. I understand that this is a gradual process. I am just trying a kickstart. I am also willing to work towards this but not sure if it will be breaking anything. Experts' advice needed. Less significant stuff below:
I and my friend had a discussion on having a direct installation from JED mechanism long before Install from Web came. But ah, we did not have the access to the JED api or alike. We never know then that we can ask/discuss for. Gave up! 😄 |
@izharaazmi Yes we are working on improvements but with the B/C promise our hands are tied. As Thomas said, at this point there isn't much we can do.
@mbabker Would be more than qualified to respond to that as he has been fixing our installer. I am not sure we should be moving the installation routines into a plugin. |
Yeah, I understand this pain. If you have few minutes to spare can you put some light on the B/C concerns regarding the installer component/plugin. I am quite not able to foresee them. Like not everyone is creating installer plugins. And if someone is indeed creating one, then won't it break as...
Those would still try to directly output the tab and just return |
3.6.0 is called a minor release. With the next major (J4) we can talk about it again 😄
Using com_ajax, it should be possible with the current plugins already,
The backward compatibility only is relevant for stuff that is already released. Since those plugins together with the new plugin event were merged only a few days ago and not yet released, we can still adjust to our liking. It's another case for the existing plugin events (they need to be properly deprecated and can be removed with J4.0.0) and the install from web plugin. |
Rather I see that it is already possible with the Installer plugin events |
That we don't know and removing the triggers for before and after will then break their installation because they are no longer called if we remove them. |
@roland-d In my last comment I didn't mean to remove those triggers. Rather I was happy to see what I wanted is already possible. 👍 |
There are already |
My concern, which IMO is solved by the triggers To elaborate my concern (likely I am not clear enough and causing confusion) – @mbabker Can you please explain a bit the "general system use" |
That's a different thing altogether then. Make the PR if you want to see that happen.
Something like the preflight script hook shouldn't be a plugin event that anything can manipulate at any point ever. Just leave that to whatever extension is being installed. |
Keep in mind that the installer plugins we talk about here are just different ways to get the extension zip file to the installer (uploading, specifying a server directory, from an URL or from JED). The install routine itself is a whole different thing and is the same for all currently four plugins. |
Thanks for the tip @Bakual 👍 |
This PR has received new commits. CC: @810, @brianteeman, @roland-d This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10450. |
I've updated this PR and moved the HTML/JS to a layout file. This allows templates to override the plugins output. |
I have tested this item ✅ successfully on 4abda6a This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10450. |
With 3.6.0, the installer tabs are generated by plugins similar how the install from web tab is done.
However this wasn't done for Hathor.
The way the plugins generated the output, it wasn't also possible to do proper overwrites for Hathor. The tabs and fieldsets were generated by the plugins, however Hathor doesn't use tabs.
Summary of Changes
This PR rewrites the plugins so they return the data instead of directly outputting the tab. The tab is then generated by the Isis layout file.
This PR also adds the functionality (plugin trigger) to Hathor.
Testing Instructions