logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to forums.ablecommerce.com. Please use your AbleCommerce username and password to Login. Forums Registration.

Notification

Icon
Error

Options
Go to last post Go to first unread
Joe Payne @ AbleMods LLC  
#1 Posted : Monday, February 22, 2021 6:55:24 AM(UTC)
Joe Payne @ AbleMods LLC

Rank: Advanced Member

Groups: HelpDesk
Joined: 11/9/2018(UTC)
Posts: 150

Thanks: 38 times
Was thanked: 6 time(s) in 6 post(s)
Somehow I've managed to break certain admin buttons in the Website menu. For example, my Add Content Page button no longer does anything when clicked. And my Add Widget Board button is broken. Yet the other admins pages with an 'Add' button in the /Website/ menu work fine.

It looks like those two buttons use a modal popup, where all the others click to a new url. So I think that's the clue. I think somehow I've broken the modal popup ability in admin. But I can't figure how that actually happens. What drives the modal popups on those buttons?

No javascript errors in console.

Fiddler 4 doesn't capture anything when the button is clicked.

I have updated the Jquery reference in admin to support the Telerik Web.UI library.

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. Forums Registration.

shaharyartiwana25816656  
#2 Posted : Monday, February 22, 2021 7:38:19 AM(UTC)
shaharyartiwana25816656

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 215

Thanks: 1 times
Was thanked: 33 time(s) in 33 post(s)
Add button on these two locations only call the show modal popup action of bootstrap. The popUp HTML content must be present on the page load.

Please confirm from the page source that the add popup content is present on the page before clicking the button.

e.g Search for div container with id="add-content-board"

Secondly, open up the browser console tab and network tab on page load to confirm that there are no errors. Try to test in FF.

If you can share what changes have you done recently on the site. It may be helpful in finding the cause.
Joe Payne @ AbleMods LLC  
#3 Posted : Wednesday, February 24, 2021 1:57:45 PM(UTC)
Joe Payne @ AbleMods LLC

Rank: Advanced Member

Groups: HelpDesk
Joined: 11/9/2018(UTC)
Posts: 150

Thanks: 38 times
Was thanked: 6 time(s) in 6 post(s)
Ok you gave me some clues to look for, so thank you for the assistance.

I was finally able to get it to work. The best I can tell, either I'm not setting up the bundles correctly when a CDN url is used, or the CDN urls provided by Telerik don't work for some reason. This is all in the admin theme by the way.

If I put direct script references in the <head> of /Areas/Admin/Views/Shared/_layout.cshtml, the existing modal popups work again and the Telerik references all work too. BUT: only if I use the local jquery. If I try it with the Telerik jquery CDN as a bundle, modal popups no longer work.

I did wind up moving your /bundles/jquery reference to the <head> section. Not sure why it's being placed at the bottom of <body>, seems like that would cause problems with certain jquery events firing before jquery gets loaded into the page. Maybe the bundles take care of that automatically, I'm not sure. I know in my page source, jquery was always showing right above the closing <body> tag.


Code:

<head>
.
.
.
    <!-- BEGIN MOD: AbleMods 2-18-2021 -->
    @Scripts.Render("~/bundles/jquery")
    
    @* Telerik references *@
    <link href="https://kendo.cdn.telerik.com/2021.1.119/styles/kendo.bootstrap-v4.min.css" rel="stylesheet" type="text/css" />

    @* Add the Kendo UI scripts: *@
    <script src="https://kendo.cdn.telerik.com/2021.1.119/js/jszip.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2021.1.119/js/kendo.all.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2021.1.119/js/kendo.aspnetmvc.min.js"></script>
    <!-- END MOD: AbleMods.com -->
.
.
.
</head>

Edited by user Wednesday, February 24, 2021 1:58:42 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.