-
-
Notifications
You must be signed in to change notification settings - Fork 4
Consider splitting customizations from core static assets #103
Comments
Hey @bachratyg, this is what happens when I rush to get things out the door for a new Umbraco version 🙄 Would appreciate anything you were able to share! |
Curious too how custom email templates are working - you should be able to modify the defaults, but I don't think adding custom will work, as Plumber is only aware of the defaults. Custom languages should probably be added to the Umbraco user language files, in /config/lang. Not sure yet how to deal with the license being wiped on clean/rebuild, without changing the license path, which would be a breaking change for all licensed installs... |
I meant this: https://github.com/nathanwoulfe/Plumber-2/blob/master/DOCS.md#localization
If I understand correctly moving the translation files/overrides from the plugin folder to /config/lang should work just as well? Then this is no longer an issue.
This should probably be configurable. If there is no config then the original path is in effect. UmbracoForms does the same, see https://our.umbraco.com/Documentation/Add-ons/The-Licensing-model/index-v7#alternative-license-location
This is the basic csproj setup with the clutter removed:
Publish profile:
And then the solution is built like this:
Now unfortunately the CopyPlumberPackageAssets target does not get a chance to run before the build fails and the plumber folders are missing. If I don't DeployOnBuild then all tasks seem to run properly (still wiping extras from the plumber folders in the process). Changing the PackageReference to this:
fixes the problem, but then I have to copy content manually and this would also disable any logic (to be added in the future) in the targets file. |
I believe the main issue with the copy target failing to run is that
so it would be probably safer to use |
First priority will be updating where the license is stored - will check the configured license path, then app_plugins. If there's nothing in the former, but exists at the latter, will move to the configured path. Something like that. |
@bachratyg I've had a fiddle with this and have managed to leave the license/key files and any modified email templates untouched on Build/Clean. Will update again to BeforeBuild/BeforeClean, and check that doesn't break anything. With those changes, I think the license can stay where it is - if it's not being deleted, it should be fine. And calling back to the language files, I haven't tried overriding from |
I believe this has been resolved with changes in Plumber.Backoffice.targets, released in v2.0.2. @bachratyg please let me know if the issue remains. |
Is your feature request related to a problem? Please describe.
I'm supposed to drop the license into
\App_Plugins\Plumber\
, I can add custom translations to\App_Plugins\Plumber\lang\
or add custom email templates under\Views\Partials\WorkflowEmails\
. However this all gets wiped out when doing a full clean/rebuild because theClearPlumberPackageAssets
target inPlumber.Backoffice.targets
indiscriminately removes everything in those folders.Describe the solution you'd like
Split configurable assets from core immutable assets or handle all local assets gracefully (e.g. no forced overwrite). For Umbraco I don't need to change
\umbraco\config\lang\en.xml, I can put customizations in
\config\lang\en.user.xml` where it is preserved.Describe alternatives you've considered
Add
ExcludeAssets="buildTransitive"
to thePackageReference
and manage static assets manually/via a custom target.It would still be nicer if there was an opt-out switch or some hook to add explicit exclusions e.g.
Licensed version?
Not yet. Planning to real soon.
Additional context
We're actually hitting this issue on Umbraco 8.17 that is tweaked to utilize an sdk-style project format (based on dotnet/project-system#2670). In the vanilla umbraco setup using the classic csproj format this is less of an issue since
Plumber.Backoffice.targets
is completely ignored. This setup is likely not supported but the described problem would be the same for U9. I can share a simplified project skeleton if needed.The text was updated successfully, but these errors were encountered: