I have had https://github.com/czone-tech/magento2-ajaxified-catalog installed within a Magneto 2 store and its worked perfect for ages however suddenly stopped.
Strangely it works if i open inspect element. There are no errors shown in console and am unsure what would be the difference or cause different based on inspect element.
This is occurring if you navigate to a category like http://staging.buzzcateringsupplies.com/bar-supplies/bar-utensils/cocktail-utensils.html and select a filter on the side the page reloads. Try the same with inspect element open and the expected ajax behavior occurs. Is there anything anyone can suggest that would cause this?
Related
I came across this odd behavior where Add to Cart button displays just a string but it is not clickable, or focusable and it doesn't have the same colors when running Cypress test. I click on it in my script, navigate to cart page, and do some assertions but the test is not failing and it is marked as pass even though it doesn't do the navigation at all.
When I navigate to the page manually on any browser, Add to Cart button displays and functions as expected.
What could be the reason for this mismatch and is there a solution to the issue?
How it looks in Cypress browser :
How it looks in chrome browser :
I need to build a chart with the Chart.js library.
I've got a strange behavior with Firefox: the charts behaves randomly, sometimes it's OK and sometimes I need to click several times on my button.
Does anyone know of a method in JavaScript to force the reload via a simple button like this?:
Refresh the page
To see the other ways to reload the page you can check this comment https://stackoverflow.com/a/7632005/17542117, but most likely browser should be reloading with your code snippet itself.
If you are still facing the issue try the following things,
try to narrow down the places where you have to click multiple times
check if you see an invisible overlay over the button which could be blocking your click action. (try placing the button from the top to the bottom of the screen while scrolling and try clicking it at multiple positions, this might help you too to find if invisible overlay is only in a specific portion of the screen)
try to see if your click function throws any console errors which can block your JS code execution on the click action.
I'm doing a registry form, one of the validations is to check the database for existing username. To do that I open a php page in a separate hidden frame that checks the database and then calls a javascript funcion on the main frame to show an icon indicating if the user exists or not.
everything works fine, except in chrome that when the php page is open, the input/text loses focus and there's no way to get it back. I've tried calling focus on the element, using timeout as i've seen this solves similar issues in chrome, but nothing works so far...
any ideas?
Thanks.
I am using jQuery accordion on a web page. In IE 8, it gets hidden sporadically sometimes when user clicks on some other window. I am not able to get why is it behaving like this. When I inspect element in HTML developer tool I could see accordion and if I change some value in that, accordion gets visible again. Can somebody please help me to identify what is the problem? If I use debugger mode everything works correctly.
I looked at code carefully and observed that accordion code was added in one extra tag but strange that only IE was not able to run it properly. So I removed that extra wrapper and its running properly now.
I'm currently moving a website from self hosted onto a CMS system. The current site uses a modal popup script called SqueezeBox.js
I've copied the code across exactly how it looks on the current website, however the modal popup box isn't triggering when I click on a thumbnail image.
Looking at the code in the header I've spotted that the CMS I'm using is also calling a number of other javascript files and I'm wondering if one of them is causing a conflict.
What's the best way to find out if this is the case? I've tried Firefox's plugin Web Developer but can't see anything in the Error Console. However I'm not 100% sure I'm using it correctly. Can anyone else point me in the direction of a simple to use javascript conflict detector?
Cheers
Adam
If you have Google Chrome, open up the Developer Tools and you can go into the 'scripts' tab, open up your javascript files and look for the click handler.. click along the side of the code to set a breakpoint, then when the code reaches that spot (if you click it, for example), it will pause, and then in the Developer Tools you can see what functions are being called where as you step through the code. You can also hover over any variable in the code window to see its value. Very handy! You can then see if it's getting into your plugin at all (you can do this as well by setting a breakpoint inside the plugin at a place like the first line that will always be accessed when its run).
I believe you can do the same thing with Firebug
It's a bit of a different thinking process to get into (step into, step over, turning breakpoints on and off etc) but it's extremely useful.
A more simple way of checking where problems are occuring is by adding an alert('im working); or something similar to code you're not sure if it's working. You can also alert a variable to see what the value is at that point. You can also use console command to print it to firebug's console. These are doing things that breakpoints/debugging do for you except with the debugging you don't need to change your code.
If there is a javascript error, then the easies way is using firebug or the Chrome Inspector (right click on the thumbnail and choose "Inspect element"). Open the console tab of either and refresh the page. If there is an error, it will be reported in the console and provide a link to the relevant line.
If there is no error being reported, then the code's logic is preventing the box from being displayed. You'll need to step through the code to find the error. Look at what function is being called from the click handler of the thumbnail image. Go to that function in either tool and place a breakpoint on the first line of the function. Click the thumbnail again and the code will pause on that line. From there you can step through the code and see which code branch is followed. There's likely a sanity check at some point that fails and causes the code to bomb out.