Manager - jQuery should not be a modified script resource #1888
Replies: 3 comments 1 reply
-
The jQuery dist included in the Piranha manager should not be modified in any way, it is a dependency of Bootstrap which is used by the UI. jQuery is installed with npm: That package resource is then included (among other third party components) in the build script here: Could it be that you're relying on a newer version of jQuery than the one included in the manager? Regards |
Beta Was this translation helpful? Give feedback.
-
You can actually specify if your custom script should be rendered before or after the core scripts from the manager UI, but maybe this is not enough for all use-cases. |
Beta Was this translation helpful? Give feedback.
-
OK, I see thanks. I have managed to get the page fully working at this point. On a slightly different area of the CMS with the front end menu (not the manager), is there a way to inject menu items that all call the same single page, but passes a parameter as part of the link? For example, we have a product page, but we will display products based on a passed category parameter. In any case, I will need to figure out something else if not possible. It is my 1st time working with Piranha, so still wrapping my head around the architecture. |
Beta Was this translation helpful? Give feedback.
-
I noticed that piranha-deps-dev.js or piranha-deps.min.js is basically jQuery with a bunch of modifications or additions. This is bad when you want to use 3rd party components like Telerik kendo UI which rely on jQuery. What ever changes were made are not compatible with jQuery behaving the same way as the stand alone js file.
I was adding a handful of back end pages and ran into the jQuery issue.
jQuery should be stock to maintain compatibility with other components that require jQuery. The other stuff should be in it's own js file.
If I comment the Piranha file mentioned & reference jQuery in the _Layout.cshtml, everything is fine, but you do get the Vue is not defined error in piranha.min.js.
-J
Beta Was this translation helpful? Give feedback.
All reactions