Closed meisterheister closed 2 years ago
Hi,
I have a question, just to be sure I understand everything correct. You had a custom JS in place (before the update), thats why the Sysconfig created a new entry in your "Custom" Config and the migration did not changed the jQuery UI version during the update and it showed you the error. Is this correct?
EDIT: And you placed your custom JS in the default loader config > Loader::Agent::CommonJS###000-Framework
Yes correct, the custom JS was there before the update and afterwards Query UI was not loaded anymore because the path did not adapt to the new version. Yes the JS is placed in default loader config.
I can force the issue by chaning the path in Sysconfig.
Von: Johannes Nickel @.> Gesendet: Donnerstag, 17. März 2022, 07:54 An: znuny/Znuny @.> Cc: meisterheister @.>; Author @.> Betreff: Re: [znuny/Znuny] Bug - Update to 6.0.40 fails due to hard coded version in Loader::Agent::CommonJS (Issue #226)
Hi,
I have a question, just to be sure I understand everything correct. You had a custom JS in place (before the update), thats why the Sysconfig created a new entry in your "Custom" Config and the migration did not changed the jQuery UI version during the update and it showed you the error. Is this correct?
— Reply to this email directly, view it on GitHubhttps://github.com/znuny/Znuny/issues/226#issuecomment-1070382337, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIQ3FJESL4HW5UL2K26HHJTVALJJHANCNFSM5Q5HQUSQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>
There are two aspects here: 1) We don't touch custom / user modified sysconfigs. So if you change a default sysconfig you have to manually check if after a migration. This will always fail, because we don't know what the user has actually changed. So we better don't touch it.
2) There is already a mechanism to prevent such issues: You can add you own loader xml for this.
<?xml version="1.0" encoding="utf-8" ?>
<otrs_config version="2.0" init="Application">
<Setting Name="Loader::Customer::CommonJS###999-YOURCUSTOMJS" Required="1" Valid="1">
<Description Translatable="1">List of custom JS files to always be loaded for the customer interface.</Description>
<Navigation>Frontend::Base::Loader</Navigation>
<Value>
<Array>
<Item>YOURCUSTOMJS.js</Item>
</Array>
</Value>
</Setting>
</otrs_config>
You can modify the loading order by changing the 999 to a lower value. 999 will load at the very end. This should resolve your problem for future updates.
Does this help?
Thanks for the hint! It worked by adding a configuration for the Agent interface. Many thanks!
I will close this then. @meisterheister 👋
Environment
Expected behaviour
When updating I assume core functionality to work in this case jQuery UI was updated as well as nunjucksjs and file path to these JS files should be common in Loader::Agent::CommonJS.
Actual behaviour
The commit Updated jQuery UI from 1.12.1 to 1.13.1. changed the path to path to 'thirdparty/jquery-ui-1.13.1/jquery-ui.js' and even if it was updated in the Sysconfig defaults in Framework.xml the settings that I had in place with a custom JS file that should be additionally loaded made the whole Loader::Agent::CommonJS Sysconfig setting overwrite the defaults thus still having the old hard coded path in place.
This should be changed to a common path as well as for the 5 other files also having the version in the path.
How to reproduce
Steps to reproduce the behavior:
Screenshots