SuiteCRM
SuiteCRM copied to clipboard
Fix #8963 - Script tags evaluated twice when AJAX UI is enabled
- Closes #8963
Credits to @FR-JS from the issue #8963
Description
After removing and replacing YUI3 (https://github.com/salesagility/SuiteCRM/blob/3f332b87ce496b8887e359e205948b234f15911d/jssource/src_files/include/javascript/sugar_3.js), there was included an issue when loading JS files in views that use AJAX UI. This issue makes the custom JS files, loading twice.
In this PR we remove the line that is causing the issue, as suggested in https://github.com/salesagility/SuiteCRM/issues/8963#issuecomment-775894649
Motivation and Context
When loading JS code in a module, it can be problematic to load it twice in the same view.
How To Test This
1- Add a console.log at the begining of the file modules/Accounts/Account.js (ex: console.log('test'); 2- Open the browser console and navigate to an Edit or Detail view of an Account 3- Check in the browser console that the console.log is displayed twice.
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Final checklist
- [x] My code follows the code style of this project found here.
- [ ] My change requires a change to the documentation.
- [x] I have read the How to Contribute guidelines.