PrestaShop TopHorizontalMenu jQuery issue + Query installation error

Category: Prestashop 15

mariatao8
Asked:
2013-09-19 2:46 pm EST

Hits: 1,300
I was trying to add/remove items on the top menu in PrestaShop, using Modules -> Top Horizontal Menu. When I configure the Top Horizontal Menu, under Inspect Element -> Console, I have errors saying
"ReferenceError: $ is not defined".
With PrestaShop's online community help, I went to the back-office, and right clicked to "View Page Source", then I could not find jQuery using "CTRL+F".
Then I contacted inMotion's Technical Support, trying to download jQuery. As directed, I went into Perl Module, searched for jQuery, and tried to install jQuery. But the installation failed. I had messages like "ERROR: Can't create '/usr/local/lib/perl5/site_perl/5.8.8'
Do not have write permissions on '/usr/local/lib/perl5/site_perl/5.8.8'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at /usr/local/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm line 3602.
PETERG/JQuery-1.06.tar.gz
./Build install -- NOT OK
----
You may have to su to root to install the package
(Or you may want to run something like
o conf make_install_make_command 'sudo make'
to raise your permissions.perlmod--Install done"

The technical support tried to help me by giving me permission but same error resulted still.

I had also verified my defines.inc.php under config folder has the correct version of jQuery as mentioned here: http://www.prestashop.com/forums/topic/240899-uncaught-referenceerror-jquery-is-not-defined/
So the error is not there either.

Could somebody help me? I really have tried everything I could

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by User

0

JacobIMH
Staff
9,968 Points
2013-09-19 3:13 pm EST
Hello mariatao8, and thanks for your question.

It seems you might have been getting lead down the wrong road, as jQuery is simply a JavaScript library, and doesn't need to be "installed" on the server. It's simply a collection of .js JavaScript files sitting on the server.

I did some poking around and it sounds like one possible fix is to ensure that your defines.inc.php file located here:

/config/defines.inc.php


Has the correct version of jQuery defined, such as:

define('_PS_JQUERY_VERSION_', '1.7.2');


You want to make sure that the version you have defined there, is the same version you're actually using on the server. You can confirm this by looking in the following directory:

/js/jquery/


You should see a file called jquery-1.7.2.min.js

If you instead see a different version there, you can update the defines.inc.php to match that version you already have. Or you can download jQuery, in this example the jquery-1.7.2.min.js version would be downloaded from http://code.jquery.com/jquery-1.7.2.min.js.

Please let us know if that works out for you. Unfortunately I was unable to pull up your account based off the email address this question was submitted under, so if you'd like us to take a closer look for you please provide the domain name you're having these issues on.

- Jacob



You must login before you can post a comment about this answer.

Hi Jacob, first thank you for your answer. But unfortunately that was not the issue. I had verified my defines.inc.php under config folder has the correct version of jQuery as directed here: http://www.prestashop.com/forums/topic/240899-uncaught-referenceerror-jquery-is-not-defined/

The domain name is mateasse.com/store, please take a closer name for me. If you need to access the back-office, could I send you a private message or take snapshots?

Thank you
mariatao8
27 Points
2013-09-19 4:09 pm EST
Hello mariatao8,

I went ahead and took a look at your admin dashboard and it seems like you're not just having an issue when trying to access the Top Horizontal Menu module.

If you just load up your admin dashboard and have Google Chrome's Inspector up, by hitting F12 and then going to the console tab. You can see you're encountering 10 Uncaught ReferenceError: $ is not defined errors.

I saw this jQuery forum post on Uncaught ReferenceError: $ is not defined that mentioned possible issues regarding using an absolute or relative URL to your jQuery files.

I'm also wondering if your admin directory having a space in it is messing things up, due to the HTML characters that need to be used in place of a blank space in the URL.

Had you noticed the spinning loading animations always in your admin dashboard? Or did you recently do something like change the admin directory name or something else before this started happening? Those should be loading off the jQuery statements, but don't seem to be having any success now.

Please let us know if you remember those ever working. Because it sounds like something was changed from the default install and pin-pointing it without a time reference on when things might have changed is difficult.

- Jacob
JacobIMH
9,968 Points
Staff
2013-09-19 5:32 pm EST
Hi, on the jQuery forum (http://forum.jquery.com/topic/uncaught-referenceerror-is-not-defined) I did not quite understand where they got the paths (<script src="js/jquery.js" type="text/javascript"></script>) from? Is that from "View Page Source"?

I am not quite sure about the spinning loading animation in my admin dashboard, since I usually don't scroll down to that part.

I tried to create a test theme and chose that for theme appearance. But it was under the direction of another inMotion support I had talked to. So I don't think it would the be the issue.

If re-install should help, I am willing to do that. Shall I do it in CPanel? Could you give me some directions on re-installation.

Thank you very much
mariatao8
27 Points
2013-09-19 6:01 pm EST
Hello again mariatao8,

The paths they were talking about for jQuery's URLs would be in the page source itself.

I would recommend trying to do a PrestaShop install in another separate directory just to test it out, and see if you're encountering the same issues in a fresh install.

If it's working in the fresh install than we could compare it to the install that's not working to possibly spot where the root problem actually lies.

Let us know what you're seeing!

- Jacob
JacobIMH
9,968 Points
Staff
2013-09-19 6:27 pm EST
Hey Jacob,
After the re-installation, everything seems to be working. Top Horizontal Menu is working. I could see jquery when I view page source. And under inspect element -> console, there is no error!

I am excited to finally enjoy Prestashop (although it is very likely that I will still come back with lots of other questions)

Thank you so much Jacob, really appreciate the help!

Would you like me to choose the best answer or leave it open since the root error to the other is still not found?

- Maria
mariatao8
27 Points
2013-09-19 6:50 pm EST
Hello Maria,

Glad to hear that it's all working! Whether or not you make it a "best answer" is up to you. Your previous error message may have simply been an installation issue and your're reinstall corrected it. Please let us know if you require any further assistance!

Regards,
Arnel C.
Arn
17,232 Points
Staff
2013-09-19 7:46 pm EST
Hello Maria,

Awesome glad that worked for you, you are quite welcome! Let us know if you run into any further snags!

- Jacob
JacobIMH
9,968 Points
Staff
2013-09-20 1:41 pm EST
Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!