jmcameron / attachments

Attachments Extension for Joomla 3, 4, and 5
GNU General Public License v3.0
12 stars 19 forks source link

Convert package to be compatible to Joomla 4+ #33

Closed parapente closed 5 months ago

parapente commented 10 months ago

This is a work in progress. It is not ready for production but should be ok to install in an isolated environment for testing. What works:

What doesn't work as expected:

Needs more testing:

What doesn't work:

There are a couple of minor problems with translated strings.

Sorry for the large number of commits but there were a lot of changes needed in the codebase and too little documentation from Joomla about how you can easily convert old components/plugins to Joomla 4.

I tried to change all functions marked as deprecated in Joomla 4 to prevent breaking the code when Joomla 5 is released.

NOTE: I cannot find anything about AttachmentsRemapper class. Could it be old unnecessary code that needs deletion?

jmcameron commented 9 months ago

@parapente It looks like you are serious about this. Would you like me to give you permissions to change 'master'?

parapente commented 9 months ago

@jmcameron If you are ok with the changes I have made, certainly. I have completely dropped compatibility with older versions of Joomla and it should only work with Joomla 4+ versions. I have a couple of questions I'd like to ask:

jmcameron commented 9 months ago

Hi Theofilos,

Since the version you are working on is not backwards compatible to Joomla 3, I suggest just forking Attachments and renaming your forked version to Attachments4 (or some name of your choice). Then apply the fixes you've made to your new fork and go for it!

AttachmentsRemapper was for a plugin stub that things like AttachmentsJFishRemapper could use to remap the "article" ids they they used to actual Jooma article IDs. See https://github.com/jmcameron/attachments_joomfish_remapper.

Yes, I suggest you include 4 in the new plugin name.

Once you've got something working, submit a Pull Request to my Attachments repo with an update to the Readme file that points to your version.

Sorry I don't have time to pursue this myself.

-Jonathan

On Sat, Sep 2, 2023 at 12:20 PM Theofilos Intzoglou < @.***> wrote:

@jmcameron https://github.com/jmcameron If you are ok with the changes I have made, certainly. I have completely dropped compatibility with older versions of Joomla and it should only work with Joomla 4+ versions. I have a couple of questions I'd like to ask:

  • Do you remember what AttachmentsRemapper class was about? Is it in a still usable plugin that is not included in the package?
  • Should I change the version number of the plugins/component to 4.0 to signify the Joomla compatibility?

— Reply to this email directly, view it on GitHub https://github.com/jmcameron/attachments/pull/33#issuecomment-1703805275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAPFQKPTBS2WXCQWSO2CRDXYMJBJANCNFSM6AAAAAA4C52ESQ . You are receiving this because you were mentioned.Message ID: @.***>

parapente commented 6 months ago

I updated the title and the status of the merge request to signify that the packages are ready for use in case someone reads this. Merry Christmas!