tikiatua/internal-assets-plugin

Craft CMS 4.0 Update

Closed this issue ยท 21 comments

This plugin blocks me from updating to Craft CMS 4.0.

Are any updates planned?

Thank you for your comment. I am currently mainly using this plugin on a Craft CMS 2 site.

As part of a redesign of the respective site I will also update the CMS to Craft Version 4 and thus update the plugin accordingly.

Honestly, I am a little bit surprised that this functionality is still not available from the builtin assets module.

Nevertheless, the current plan is to update the site (and the plugin) sometime in July/August.

hi, do you still have plan to update it?

Yes, actually started working on the new version, but it is not finished yet.

Hi Tikiatua, we are hoping the update will be available soon as we want to update our website which uses this plugin to Craft 4. Do you perhaps have an estimated timeline?

Best regards from Holland!

Hi @msnzigt

Thank your for your message. I got somewhat derailed on the plugin development since the project where I want to use it was postponed to next year. I will look into the code this weekend and see if I can easily migrate it to Craft 4.

Too bad that this functionality was not directly integrated in the regular Craft 4 source. Might have to do with the pro license required for the functionality to work.

So unfortunately, the CraftCMS documentation on how to implement custom volumes is incorrect. A lot of it seems to refer to the implementation as in version 3, referring to classes that are no longer here and events that do no longer exist.

Therefore, I will need to dive deep into the craftcms source source to find out how I can provide member-only volume functionality. This will probably take until sometime in January.

I have raised the issue on the craft cms repos:
craftcms/docs#401 (comment)

Hi @tikiatua, thanks for your resonse and effort! Too bad about the documentation not being up to date :( Hope you are able to update the plugin. Enjoy the holidays and if there is any news, keep us posted!

Hi @tikiatua, hope you enjoyed the holidays! I was wondering if you have already found a solution to the implementation of custom volumes and the plugin for Craft 4?

Working on it. The documentation is still very limited. Apparently it is no longer possible to create custom volume types. Instead custom filesystems can be created. However, instead of implementing a custom filesystem, I would rather have an option to use various different filesystems and just protect the respective asset links.

I am currently struggling with two topics:

  • How to define the access rights for a specific volume
  • How to intercept all requests to a protected volume and check the respective access rights

Hi @tikiatua, I was wondering how it looks on the plugin? We are not really experienced in Craft plugin development, but is there a way we could perheps help with someting?

Another request for the Craft 4 version please. We have done plugin dev and would also be happy to see if we can offer any help. However, I guess the main issue is the missing docs. It was a while since you raised the issue with the Craft team - are you able to give them a polite nudge on getting the docs updated?

Hi @msnzigt & @aarmitage

Thank you for your feedback and your support. I have just been able to create a first release of a Craft 4 version. Please be advised, that this version currently only supports paths prefixed with /internal/ and does not yet support image transformations. I will need to figure out how to publish the new version to the craft cms store, but it should be available there soon.

Ok. New version is now available from the plugin store.

Hi @tikiatua, awesome! I will ask our team to test the plugin and give feedback on it. Many thanks for taking the time to develop the plugin :)

Amazing, thank you. We'll check our use case for this and if we can use it as it stands, we'll share any feedback. Appreciate your work!

Thank you very much!

Working as expected! Thank you very much for the updated version :)

Hmm, this version of the plugin doesn't seem to properly account for using aliases in the "Base URL" & "Base Path". Additionally it is attempting to use rootUrl on a Volume but when doing comparisons it is not accounting for removing the domain name when it is trying to compare paths.

Dear @timnolte

Thank you for your feedback. This is correct. The current implementation covers my rather basic use case. There are likely some other use and edge cases, that it does not yet handle correctly. Happy to get feedback and further improve the plugin.

Closing this issue, as the plugin is now compatible with Craft CMS 5.x and further enhancements will only be done on this version.