hikashop issues

  • Posts: 52
  • Thank you received: 0
13 years 1 month ago #26943

Hello,

I installed Hikashop Starter 1.5.4. on my joomla system 1.5.23 and everything worked fine until yesterday, when 2 backend issues occured:

1. When doing anything Backend in HikaShop (Components -> Hikashop), it is impossible to click on any joomla administrator menu (site, menus, componentes, extensions, tools, help)! I can only click on hikashop menu items. Moreover it is impossible to quit hikashop menu in Backend. The only possibility I found is, to delete" ?option=com_hikashop& ..." from addressbar in my browser to exit hikashop menu so that normal joomla backend menu items are clickable again... can anybody help? Reinstalling Hikashop Starter did not help.

2. Again Backend Hikashop: when opening any product, an error occurs:

Unable to initialize TinyMCE : TypeError: 'undefined' is not an object


At first I must say, that JCE is set to default editor. Switching to TinyMCE does not help, same error.


What's up with my Hikashop? :blink:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 month ago #26947

It seems that you have a javascript error on your back end.
It might be another extension that you installed/updated which creates a javascript error on all the pages and thus breaks the javascript code of HikaShop and JCE.
Did you install/update something just before it started to not work anymore ?

You should also look at the javascript error console of your browser when you're in HikaShop and that you have the problem. It should display error messages regarding the problem which might help us understand the problem.

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 0
13 years 1 month ago #26949

this is what the error console displays when the tinymce error occurs:

mootools.js:54, TypeError: Type error
index.js:27, TypeError: 'undefined' is not a function (evaluating '$('menu')')
mootools.js:23, TypeError: 'undefined' is not a function (evaluating '$(el)')


And this is the content of the error console when entering hikashop in backend:

index.js:27, TypeError: 'undefined' is not a function (evaluating '$('menu')')
mootools.js:23, TypeError: 'undefined' is not a function (evaluating '$(el)')


I did not install anything before these issues occured. On contrary, I deleted some components and modules yesterday.

Last edit: 13 years 1 month ago by websquirrel.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 month ago #26952

That's a problem with jquery. You must have a plugin or something which loads jquery on the backend without the noconflict code.
That's a common issue with javascript libraries:
www.hikashop.com/en/support/documentatio...ty-issues.html#modal

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 0
13 years 1 month ago #26956

hm, ok. I read your page and noticed that one of the plugins mentioned there (System - Core Design Scriptegrator plugin) was active on my site, too. Deactivating it, helped. I wrote them if they could fix the problem. You cannot fix it, can't you?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 month ago #26957

We can't.

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 0
13 years 1 month ago #26980

Ok, here is the answer of the authors from Core Design Scriptegrator plugin:

Try to edit the following Hikashop file:
media/com_hikashop/js/hikashop.js

Remove lines 122 - 126:

if (typeof(jQuery) != "undefined") {
if (typeof(jQuery.noConflict) == "function") {
jQuery.noConflict();
}
}

I don't know why this piece of jQuery code is placed in the file but I guess the authors of Hikashop have their own explanation for it.


What do you think about it? What is your explanation for it?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 month ago #26981

When jQuery based javascript extensions are developed for joomla, they should not use $ and include the noConflict code in order to be compatible with mootools based extensions which are the norm, since joomla includes mootools by default.
Otherwise, when mootools based extensions' javascript is run, their code breaks. In order to avoid that, we added ourself that noConflict code to make sure that the javascript in HikaShop doesn't break because of other extensions.
However, if other extensions using jquery do not follow compatibility guidelines, their js code can still break. That often happen when they use the $ shortcut in their code instead of jQuery or encapsulate their code in jQuery.
Here is more reading about that:
www.wpshoppe.com/2008/12/24/working-toge...jquery-and-mootools/
stackoverflow.com/questions/2812359/moot...ite-dollar-safe-mode

On our end, we never use $ and try to use as less as less possible mootools and try not to use jquery at all. If everyone was doing the same, all the extensions' javascript would be working together fine. However, life is not simple :)

If it works for you without those lines, then you should remove them. However, you might have javascript problems in order places on your website like popups not working in HikaShop. Remember though that each time you update HikaShop all the files of HikaShop are overwritten. So you will loose the modification and will have to reapply it.

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 0
13 years 1 month ago #26982

Well, the solution of them worked for me, deleting your lines made both issues disappear.
On the other hand you had no solution for me, so I do not have any alternative but to do what they say.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 month ago #26983

I just had a look at their plugin. I can see that they have an option to disable their plugin in the backend. I don't know for what you're using this plugin but if you use it only on the front end, you could try to enable it only on the front end with the plugin option. Then, you wouldn't need to remove these lines of code to have the menus working on the backend.

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 0
13 years 1 month ago #26984

I use it only in the front end so far, but if I turn it off in back end, every time when I login in back end a ugly message appears, that it is turned off ... that made me mad, so I turned it on for back end, too :blush:

Anyway, I will see if everything runs fine now. If not, I must consult them again for a better solution. I forwarded your explanation to them. Maybe they learn a little bit? ;)

Last edit: 13 years 1 month ago by websquirrel.

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 0
13 years 1 month ago #27934

I updated to HikaShop Business and Joomla! 1.5.24.

I experience a new issue now: hikashop seems not to work with any editor! I tried JCE as well as the newest JoomlaCK. JoomlaCK is not even visible and JCE does nothing display in WYSIWYG mode. Both work completely normal with joomla articles. But when editing products in hikashop, the description is displayed for a moment and then disappears. Also it is not possible to write anything in WYSIWYG editor window. :blink:

TypeError: 'undefined' is not an object (evaluating 'j.createRange')

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 month ago #27955

Hi,

Updating to the business edition does not change anything. The HTML editors are handled the same way as in other editions. If it worked before for you, it should still work. Hence, the problem must come from something else. Did you install any system plugin since the last time it worked ?
The 1.5.24 release just corrects a security issue somewhere in joomla so it should not have any impact on the editors.

Did you try with different browsers ?
Could you also try with the TinyMCE editor ?

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 0
13 years 1 month ago #27957

Hello!

OK, here is the report.

I tested on Safari 5.1, Firefox 7.0.1 , Google Chrome 14.0.835.202 and Opera 11.10. I am working on MacOS X so there is no IE available ;)

Safari and Google Chrome had exact the same problem: JCE and TinyMCE could not display anything. The written text in product description flashes for one moment and then everything is blank white as if there were no content. It is not possible to write anything in the editor content field.

Error console displayed a tiny mce javascript error as posted before (tiny mce.js:1).

Firefox and Opera could display everything with JCE as well as TinyMCE, but they also showed tinymce javascript errors in error console. Opera showed even the most detailed errors as followed:

[23. Oktober 2011 11:23:41] JavaScript - http://shop.xenianaturkosmetik.at/administrator/index.php?option=com_hikashop&ctrl=product&task=edit&cid[]=5
Event thread: load
Uncaught exception: [object DOMException]
Error thrown at line 1, column 182282 in <anonymous function: setRng>(i) in http://shop.xenianaturkosmetik.at/components/com_jce/editor/tiny_mce/tiny_mce.js?version=2015:
    g.selectedRange=h.getRangeAt(0)
called from line 1, column 185425 in <anonymous function: normalize>() in http://shop.xenianaturkosmetik.at/components/com_jce/editor/tiny_mce/tiny_mce.js?version=2015:
    g.setRng(f)
called from line 1, column 310137 in <anonymous function: setContent>(u, s) in http://shop.xenianaturkosmetik.at/components/com_jce/editor/tiny_mce/tiny_mce.js?version=2015:
    r.selection.normalize();
called from line 1, column 308282 in <anonymous function: load>(s) in http://shop.xenianaturkosmetik.at/components/com_jce/editor/tiny_mce/tiny_mce.js?version=2015:
    q=p.setContent(d(r.value)?r.value:r.innerHTML,s);
called from line 1, column 291055 in <anonymous function: setupIframe>() in http://shop.xenianaturkosmetik.at/components/com_jce/editor/tiny_mce/tiny_mce.js?version=2015:
    q.load({initial:true,format:"html"});
called from line 1, column 280005 in <anonymous function: init>() in http://shop.xenianaturkosmetik.at/components/com_jce/editor/tiny_mce/tiny_mce.js?version=2015:
    H.setupIframe()
called from line 1, column 276260 in <anonymous function: render>() in http://shop.xenianaturkosmetik.at/components/com_jce/editor/tiny_mce/tiny_mce.js?version=2015:
    u.init()
called from line 1, column 197682 in <anonymous function: o>(s) in http://shop.xenianaturkosmetik.at/components/com_jce/editor/tiny_mce/tiny_mce.js?version=2015:
    s.func.call(s.scope)
called via Function.prototype.call() from line 90, column 1882 in <anonymous function: each>(i, f, h) in http://shop.xenianaturkosmetik.at/components/com_jce/editor/tiny_mce/tiny_mce.js?version=2015:
    j=0,g=i.length
called from line 1, column 197499 in <anonymous function: o>() in http://shop.xenianaturkosmetik.at/components/com_jce/editor/tiny_mce/tiny_mce.js?version=2015:
    a.each(d,function(s){s.func.call(s.scope)});

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 month ago #27978

Do you have the same errors with both editors ?

That sounds like a problem with the editor.
Actually, I searched a bit around and the same bug trace can be found on:
www.tinymce.com/develop/bugtracker_view.php?id=4306
as well as here:
forum.joomla.org/viewtopic.php?p=2565626

Do you use the latest version of JCE ? If not, you might first want to update it (and clear your browser's cache after that).

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 0
13 years 1 month ago #27982

nicolas wrote:

Do you have the same errors with both editors ?

yes

Do you use the latest version of JCE ?

Yes

I believe it is a problem of hikashop, because these issues occure in hikashop only. Joomla articles and other components have no Problems with any of these editors. Hikashop has even problems with default editor: swiching editors in global configuration does not work for hikashop, it always loads jce unless you change that in hikashop settings! But that's not the point of the default setting, isnt it?

Last edit: 13 years 1 month ago by websquirrel.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 month ago #27991

Well, you can see that it works on our demo website. In fact, it works with any editors out there.
So there must be something else.

Could you check the HTML source of the page to see if jquery or other javascript library is loaded in your back end ?
If yes, could you try to deactivate it/use another library (some extensions allow you to choose another library).
I suppose that the problem is linked to the fact that HikaShop loads the mootools library (the default js library in joomla) on the back end to display popupsand that your other components do not. However, because of an incompatibility with mootools and another piece of javascript in your back end, it crashes the editor. It's probably similar to that:
www.hikashop.com/en/support/documentatio...ty-issues.html#modal
So you might want to check for the extensions mentioned there too.

Please Log in or Create an account to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum