ajax error 20120325.png

pseudo kludge patch:
views_slideshow_cycle.views_slideshow.inc
line 270:
- if (!$pause_path = _views_slideshow_cycle_pause_library_path()) {
+ if (!$pause_path = 'foo') {

This can be confusing, because there are lots of ways to break Ajax like this, perhaps commonly as documented in http://drupal.org/node/1106166#comment-4934930 although that is not the case here. Also there is lots of chatter around disabling devel modules, disabling drupalforfirebug, disabling firebug, and so on.

In any case, I'm working around this for the time being with the kludge, above.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markhalliwell’s picture

Title: Ajax error in views slideshow format settings » Call to undefined function _views_slideshow_cycle_pause_libary_path()
Project: Open Enterprise » Views Slideshow
Version: 7.x-1.0-beta7 » 7.x-3.0

Moving this to the Views Slideshow module issue queue.

If you look at the actual error: "Fatal error: Call to undefined function _views_slideshow_cycle_pause_libary_path() in ../../views_slideshow_cycle.views_slideshow.inc on line 271" it shows that the problem actually lies with the Views Slideshow Cycle module inside the Views Slideshow module.

A common misconception is that issues like these belong to the OE issue queue. Not only does this issue (in actuality) stem from the Enterprise Rotator app (not OE), but ultimately the contributed module that the app depends on: Views Slideshow.

Because I'm commenting on this issue, I'll be in the loop when this issue gets resolved so we can update the appropriate app.

jghyde’s picture

The problem is actually on line 88 of the views_slideshow_cycle.module where the function name is misspelled (forgot the 'c' in cycle, as in the function should really be called _views_slideshow_cycle_pause_library_path and NOT _views_slideshow_cyle_pause_library_path

<?php
/**
 * Gets the path to the jQuery pause library.
 *
 * @return
 *   The path to the pause library js file, or FALSE if not found.
 */
function _views_slideshow_cycle_pause_library_path() {  // <-- change line 88 to this
  $pause_path = libraries_get_path('jquery.pause');
?>
jghyde’s picture

Here's a patch for #2.

redndahead’s picture

Status: Active » Fixed

Sorry about that. This patch has been committed.

@Mark Carver
You probably shouldn't rely on the dev version. I would pin your make file it to a tested commit.

markhalliwell’s picture

I will discuss putting the patch in the Enterprise Rotator app ASAP. Just out of curiosity though, is there a plan for a release as this seems to be a vital bug?

redndahead’s picture

This bug was just added yesterday or the day before and doesn't occur in the 3.0 version. So it only lasted 2 days at the most. That said I'm still going through the views slideshow issues at the moment so a release will occur when I'm done with that. Probably in 2 to 3 weeks.

markhalliwell’s picture

Ah, I misread your previous post. The creator of this issue initially put this in the Open Enterprise queue. It seems that this issue wasn't really related to OE or the Enterprise Rotator app in the first place. We, of course, only include stable releases that we know work. Instead rather, this original issue was probably a result of the creator upgrading this module to the dev release from the recommended one where this short lived bug was found. Glad this was able to get resolved quickly :)

juampynr’s picture

Priority: Normal » Critical
Status: Fixed » Active
FileSize
1.3 KB

Now that it got fixed it finally calls libraries_get_path() to check the presence of JQueryCycle library. This is fine at runtime phase but it crashes at installation phase if libraries module is not enabled.

This error occurs consistently on installation profiles which attempt to enable this module (for example, Corporative Site). The error that is printed during Drupal installation is the following one:

Fatal error: Call to undefined function libraries_get_path() in /home/juampy/projects/corporative_site/profiles/corporative_site/modules/contrib/views_slideshow/contrib/views_slideshow_cycle/views_slideshow_cycle.module on line 60

Call Stack:
    0.0008     370192   1. {main}() /usr/share/drush/drush.php:0
    0.0274    3087188   2. drush_main() /usr/share/drush/drush.php:14
    0.1852    7059504   3. _drush_bootstrap_and_dispatch() /usr/share/drush/drush.php:59
    0.3265    9666848   4. drush_dispatch() /usr/share/drush/drush.php:90
    0.5715    9679664   5. call_user_func_array() /usr/share/drush/includes/command.inc:165
    0.5715    9679916   6. drush_command() /usr/share/drush/includes/command.inc:165
    0.5721    9680228   7. _drush_invoke_hooks() /usr/share/drush/includes/command.inc:198
    5.0671    9706084   8. call_user_func_array() /usr/share/drush/includes/command.inc:324
    5.0672    9706348   9. drush_core_site_install() /usr/share/drush/includes/command.inc:324
    5.0704    9725240  10. drush_core_site_install_version() /usr/share/drush/commands/core/site_install.drush.inc:151
    5.0856   10134516  11. install_drupal() /usr/share/drush/commands/core/drupal/site_install.inc:60
    5.1619   14185384  12. install_run_tasks() /home/juampy/projects/corporative_site/includes/install.core.inc:79
    6.5812   14747336  13. install_run_task() /home/juampy/projects/corporative_site/includes/install.core.inc:342
    6.5812   14747336  14. install_verify_requirements() /home/juampy/projects/corporative_site/includes/install.core.inc:473
    6.5812   14748732  15. install_check_requirements() /home/juampy/projects/corporative_site/includes/install.core.inc:718
    6.5812   14748732  16. drupal_check_profile() /home/juampy/projects/corporative_site/includes/install.core.inc:1550
    7.1486   17386060  17. views_slideshow_cycle_requirements() /home/juampy/projects/corporative_site/includes/install.inc:1104
    7.1494   17460716  18. _views_slideshow_cycle_library_path() /home/juampy/projects/corporative_site/profiles/corporative_site/modules/contrib/views_slideshow/contrib/views_slideshow_cycle/views_slideshow_cycle.install:15

At the documentation of hook_requirements() it is said:

Note that the installation of a module can happen during installation of Drupal itself (by install.php) with an installation profile or later by hand. As a consequence, install-time requirements must be checked without access to the full Drupal API, because it is not available during install.php.

Therefore, I am attaching a patch in which only at runtime phase hook_requirements() does the library check.

juampynr’s picture

Status: Active » Needs review

Changing status to needs review.

xiukun.zhou’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.