- Posts: 154
- Thank you received: 4
Squeezebox trouble after updates
- olivnewton
-
Topic Author
- Offline
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.6
dear team,
we did the joomla update from 2.5 to 3.4 and all respective extension updates, hikashop as well. so far we managed to fix all old broker hika layouts, thanks to your help. next issues that came up were some trouble with adding/changing the address in the checkout process. this is where we discovered, that even though you claim 2.6.1 is mootools-free, and even though we changed the popup mode in the backend to "vex" (= what is this anyway? we cannot use bootstrap so we thought this might be some alternative?) we get the following javascript errors:
on "HOME"
ReferenceError: Hash is not defined
modal.js (line 7, col 7444)
TypeError: window.addEvent is not a function
window.addEvent('domready', function() {
test.bo...ik.de (line 45, col 4)
TypeError: SqueezeBox is undefined
checkout (line 199, col 4)
...upon checking with firebug, they are all related to "squeezebox", even though disabled as stated above...
this is being loaded into the source code:
on "ONLINE SHOP"
NO ERRORS AT ALL
NO EXTRA SCRIPTS
on "CHECKOUT"
ReferenceError: Hash is not defined
modal.js (line 7, col 7444)
TypeError: SqueezeBox is undefined
checkout (line 199, col 4)
...if compared to "HOME" one error less, but here much move hika-js is being loaded...
Part of the message is hidden for the guests. Please log in or register to see it.
any idea/help on this issue?
thanks in advance and best regards,
dee
Please Log in or Create an account to join the conversation.
When I look at the HTML of the page on your checkout, the only reference to squeezeBox in the HTML comes from the images of the products in the cart display where there is a popup when you click on the product image:
take.ms/nIZh8
That code is not in HikaShop by default (the product images are not clickable by default in the cart) and is something that you added yourself to the file "cart" of the view "checkout" via the menu Display>Views.
Please Log in or Create an account to join the conversation.
- olivnewton
-
Topic Author
- Offline
- Posts: 154
- Thank you received: 4
but how do you exmplain it on HOME & ONLINE-SHOP?
could not find any squeezebox links in there, but squeezebox is still being loaded!
Part of the message is hidden for the guests. Please log in or register to see it.
Please Log in or Create an account to join the conversation.
Then something must be initializing the modal library on these pages without using it.
On the home page, the only thing that is loaded in the CSS and the JS main files of HikaShop. And there is nothing displayed by HikaShop. So that means that a system plugin of HikaShop must be triggered and it loads the main library of HikaShop to do some processing.
But by doing that, there is no reason that the modal library would be loaded by HikaShop. HikaShop only loads it when it needs it.
So I'm guessing that there must be something else on your website loading it.
And looking at the order of the CSS and JS files in the header, it indicates that there something loading the modal library before the HikaShop library is loaded. So it can't come from HikaShop. It has to be something else on your website.
Please Log in or Create an account to join the conversation.
- olivnewton
-
Topic Author
- Offline
- Posts: 154
- Thank you received: 4
Please Log in or Create an account to join the conversation.
The error you get is because the popup modal system is loaded but mootools is removed and thus it's missing some pieces when it tries to initialize itself.
I think I know why you get the modal system loaded when it shouldn't.
Try to change the line:
if($redirect=='ask_user' || hikashop_loadUser() == null){
to:
if($redirect=='ask_user' || $config->get('enable_wishlist') && hikashop_loadUser() == null){
in the file administrator/components/com_hikashop/helpers/cart.php
Without that change, regardless of whether the wishlist system is used or not, the system always loads the modal library if the user is not logged in in order to tell him that he needs to login before adding the product to the wishlist when using the add to wishlist button.
Doing that change will make it so that the modal library is only loaded when the wishlist system is activated and that the user is not logged in.
Please Log in or Create an account to join the conversation.
- olivnewton
-
Topic Author
- Offline
- Posts: 154
- Thank you received: 4
the change would be obviously a hika-hack, would you include this on the next update?
i thought you are using a mootools-free modal library anyway, or at least there is an option to do so.
correct me if i am wrong, but i thought i read somewhere that the newest version is supposed to be totally mootools free?
PS. sorry, i tried the above but the error is still on all hika pages present, the following scripts get still loaded regardless me disabling NoNumber Modals, JCE Media Box and the included fix of yours in cart.php ...
from line 149 onwards inside the source code of /online-shop:
Please Log in or Create an account to join the conversation.
It would obviously be included on the next update yes.
And no, the new version is not supposed to be mootools-free actually.
We still use it in a number of places. However, we now only load it when needed.
If that change doesn't help, then I don't see why that would come from HikaShop.
The only place where we could load the modal system is there:
JHTML::_('behavior.modal');
it's the line just below the check.
Try to remova that line and see if that helps. If not, then there modal library isn't loaded by HikaShop from what I can see.
The best in that case will be to edit the file libraries/cms/html/behavior.php and add such code:
echo '<pre>',print_r(debug_backtrace(),1),'</pre>';
after the line:
JHtml::_('script', 'system/modal.js', true, true);
That's what is loading the modal system in Joomla and that code will provide the call stack leading to that so you/we will be able to know what loads it.
Please Log in or Create an account to join the conversation.
- olivnewton
-
Topic Author
- Offline
- Posts: 154
- Thank you received: 4
next problem appearing:
if you visit this page
Part of the message is hidden for the guests. Please log in or register to see it.
and click on the product image, a modal without mootools appears, all working great!
if you add this product to cart, then click on the cart (on the right a module called (WARENKORB, with the link "Warenkorb / Zur Kasse") you see the product image under the column "PRODUKT". if you click on it no modal opens, instead the image is opened on a new tab AND if you check the source code, again here are the squeezebox errors present!
must be another place to remove the before mentioned line?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- olivnewton
-
Topic Author
- Offline
- Posts: 154
- Thank you received: 4
change in the override of checkout>cart.php
around line 300 to the following:
"false" was originally set to "true" (not by me) and this was causing the modal to be displayed and trying to load mootools again...
Please Log in or Create an account to join the conversation.
- olivnewton
-
Topic Author
- Offline
- Posts: 154
- Thank you received: 4
what files do we need to change?
we have overrides for "checkout" for the following files:
address.php
address_view.php
step.php
cart.php
login.php
payment.php
Please Log in or Create an account to join the conversation.
From what I can see on your checkout, there are two possible causes for that:
1. You've configured the "address selector" setting of the HikaShop configuration to "popup" and thus it uses the popup system of mootools.
2. You have old overrides of address and address_view which uses the popup system of mootools. Removing them would solve that in that case.
Please Log in or Create an account to join the conversation.
- olivnewton
-
Topic Author
- Offline
- Posts: 154
- Thank you received: 4
Please Log in or Create an account to join the conversation.
I've checked the page there but I don't see anything which uses the mootools popups.
The best in that case will be to edit the file libraries/cms/html/behavior.php and add such code:
echo '<pre>',print_r(debug_backtrace(),1),'</pre>';
after the line:
JHtml::_('script', 'system/modal.js', true, true);
That's what is loading the modal system in Joomla and that code will provide the call stack leading to that so you/we will be able to know what loads it.
Please Log in or Create an account to join the conversation.
- olivnewton
-
Topic Author
- Offline
- Posts: 154
- Thank you received: 4
it was a bit difficult to run the debug_backtrace as it always lead to an fatal error, so i had to allocate more RAM to the account. after finally it completed, i got 20MB of data inside the <pre>tags. i compressed it to 2MB.
Part of the message is hidden for the guests. Please log in or register to see it.
maybe you can see the reason for the problem? additionally i can also help to find a hint if you give me some instructions, as i never did this before.
Please Log in or Create an account to join the conversation.
That's great. It's exactly what we need. If you can provide the same thing next time you find another problem with the mootools popup, we'll be able to directly tell you what to do.
Add the code:
in order to load the modal system only when the popup selector is selected.
We'll also add that on our end for the next version.
Please Log in or Create an account to join the conversation.
- olivnewton
-
Topic Author
- Offline
- Posts: 154
- Thank you received: 4
next errors:
1 .after selecting the only one delivery method and clicking "next", on step-3 (payment method) i get the following error:
2. when selecting the payment method and clicking "next", nothing happens (except the same error as before shows up on the console), only after clicking on "next" again for the second time
Please Log in or Create an account to join the conversation.
Well, the selection system for payment methods uses mootools javascript. So it's normal that you get that error if you remove mootools.
Try changing the code:
Please Log in or Create an account to join the conversation.
- olivnewton
-
Topic Author
- Offline
- Posts: 154
- Thank you received: 4
Please Log in or Create an account to join the conversation.