I am using Ajax for pagination for a form in Drupal 6 project. It is working fine on my local machine with default theme but on live server it gives me an error and generates another pagination links below original one.

When I click on Next, Previous or page link it gives me an error "c is undefined http://siteurl/sites/default/files/js/js_2ebf7f4036f86f9133a99317ed832acf.js/eval/seq/1 Line 1". Every time I click on link, it gives me the same error.

I have searched for some solutions, like http://drupal.org/node/846026, but they are not useful

  • Does it work if you clear cache? Does it work if you turn of Javascript aggregation? Are there any errors in the status report? – mpdonadio May 7 '12 at 21:27
  • No every time I change the code, I used to clear cache and there are some javascript warnings – Nilamkumar Patel May 8 '12 at 7:53

Finally I fixed it. But I think there should be better way of doing that. All I did was, I added latest jQuery file from Google CDN in the module itself as it was clashing with Drupal 6 dynamically added jQuery 1.2.x and giving me error.

 drupal_add_js(drupal_get_path('module', 'my_module') . '/my_module.js');

I used some ajax calls for pagination, due to which old jQuery was giving me an error. It is fixed with newer version of jQuery. I also tried http://drupal.org/node/1058168 but it was also not useful.

Please suggest if there is any better way of doing the same.

  • 2
    Updating jQuery is tricky; it has a bad habit of breaking admin feaures. Take a look at the jQuery Update and jQuery Multi modules. The later is my preferred method nowadays. – mpdonadio May 8 '12 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.