Skip to content
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

Publish extension assets during installation #3273

Closed
Guite opened this issue Dec 6, 2016 · 13 comments
Closed

Publish extension assets during installation #3273

Guite opened this issue Dec 6, 2016 · 13 comments
Labels
Milestone

Comments

@Guite
Copy link
Member

Guite commented Dec 6, 2016

When an extension is installed, it's assets should be copied into the appropriate subfolder of web.

@Guite Guite added the Feature label Dec 6, 2016
@Guite Guite added this to the 2.0.0-beta1 milestone Dec 6, 2016
@shefik
Copy link
Contributor

shefik commented Dec 6, 2016

And when an extension is upgraded? Removed when uninstalled?

@Guite
Copy link
Member Author

Guite commented Dec 6, 2016

Yes.

@Guite
Copy link
Member Author

Guite commented Dec 6, 2016

This needs to be done for modules as well as themes.

@craigh
Copy link
Member

craigh commented Dec 6, 2016

the difficulty here is that the web user (php?) may not have rights to the /web directory. The assets are typically installed by composer being run at the CLI by a user with rights to the directory. The php user typically has rights only to the cache directory.

If the rights issue is worked out, then this is pretty straightforward, I think.

protected function execute(InputInterface $input, OutputInterface $output)

@Guite
Copy link
Member Author

Guite commented Mar 16, 2017

Modules should also be able to perform custom push/copy operations. For example if images are dynamically generated they need to be copied into the web folder again after they have been updated.

@craigh
Copy link
Member

craigh commented Mar 29, 2017

again - I don't see how this can be done as there will be a rights/access issue to the /web directory

@Guite
Copy link
Member Author

Guite commented Mar 30, 2017

possible if we depend that on #3438 ;-)

@Guite Guite modified the milestones: Future Ideas, 2.0.0-beta1 Mar 30, 2017
@craigh
Copy link
Member

craigh commented Apr 6, 2017

actually, this was originally implemented

// $this->get('zikula_extensions_module.extension_helper')->installAssets();

but it is commented because the feature takes too long.

@craigh
Copy link
Member

craigh commented Sep 15, 2017

refs #3804

@Guite
Copy link
Member Author

Guite commented Jan 26, 2020

Moved to 3.0.0 because index.php will be moved into public folder!

@craigh
Copy link
Member

craigh commented Jan 27, 2020

FYI - this is now done 'on demand' when the asset is needed and not found, it is copied from the bundle public directory to the project public directory and served from there. This could be sped up further (maybe) by

  1. symlink instead of full copy
  2. do not check files for existence (and similar later in class)

@Guite
Copy link
Member Author

Guite commented Jan 28, 2020

Proposal for a first solution of this task:

An event handler should remove all assets from public/modules/acmefoomodule/ when AcmeFooModule is updated (to ensure renewal) or removed (to cleanup).

@craigh
Copy link
Member

craigh commented Jan 28, 2020

agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants