I've installed iCalcreator in the libraries folder of my site installation, and status report is in the green, saying that it's installed, and that the version is 2.16.6. However, when I try to create a feed in Views, I get the following error:

Please install the iCalcreator library to enable iCal output.

instead of an iCal output. I can provide the view code, if that would help, but any assistance would be appreciated.

CommentFileSizeAuthor
#5 date_ical-debugging.patch655 bytescoredumperror

Comments

coredumperror’s picture

Hmmm, upon looking at the code, I see that the status report code uses the libraries_detect() function to determine whether iCalcreator is installed, but the Views plugin uses libraries_load(). That may be contributing to your issue, but since I didn't actually write that particular section of the code, I'm not certain.

Could you tell me the exact folder path on your site in which the iCalcreator.class.php file resides? It should be:
sites/all/libraries/iCalcreator/iCalcreator.class.php

shendric’s picture

Hey,

Thanks, my path is exactly the same as yours.

coredumperror’s picture

I've been trying to debug this issue, but I haven't been able to reproduce it. Could you tell me some more detailed information about your site install? What OS is it running on? Are the file permissions of the iCalcreator folder correct for Apache to read the file? Which versions of Drupal core and Views are you using?

Also, are you seeing this message in the View preview, or in the actual iCal feed?

Depending on your answers, I may have some instructions for you to help me get more information about why this isn't working on your site.

shendric’s picture

Thanks for the response. Here are the details:

RHEL 6 is the OS it's running on with Apache as the web server
I'm using Drupal 7.19 and Views 7.x-3.5 (both the latest as far as I can tell)
The "iCalcreator" directory has the same file permssions as the other libraries I have in the libraries folder, although the other libraries are jQuery libraries, not PHP, if that makes a difference. The perms are 770, with apache as the owner. For "iCalcreator.class.php" the perms are 660, with apache as the owner (perhaps it needs to be executable?).

Just some added info: It appears in both the iCal file, and in the Views preview. And I changed the perms on iCalcreator.class.php to 770, with no change.

coredumperror’s picture

StatusFileSize
new655 bytes

Hmmm, this is very vexing. I have absolutely no clue why this is happened to you.

So, I'm going to need you to perform these steps, which will help me diagnose the problem:

1) Install and enable the Devel module.
2) Apply the attached patch to your copy of Date iCal.
3) If it exists, delete /tmp/drupal_debug.txt.
4) Attempt to load the View preview of the feed.
5) Attach the new copy of /tmp/drupal_debug.txt to this issue. It should look something like this:

Array
(
    [name] => iCalcreator
    [vendor url] => http://kigkonsult.se/iCalcreator/index.php
    [download url] => http://kigkonsult.se/downloads/index.php#icalcreator
    [version arguments] => Array
        (
            [file] => iCalcreator.class.php
            [pattern] => /define\( 'ICALCREATOR_VERSION', 'iCalcreator ([\d\.]+)' \);/
            [lines] => 100
        )

    [files] => Array
        (
            [php] => Array
                (
                    [iCalcreator.class.php] => Array
                        (
                        )

                )

        )

    [module] => date_ical
    [machine name] => iCalcreator
    [path] => 
    [library path] => sites/all/libraries/iCalcreator
    [version callback] => libraries_get_version
    [dependencies] => Array
        (
        )

    [versions] => Array
        (
        )

    [integration files] => Array
        (
        )

    [callbacks] => Array
        (
            [info] => Array
                (
                    [0] => libraries_prepare_files
                )

            [pre-detect] => Array
                (
                )

            [post-detect] => Array
                (
                    [0] => libraries_detect_dependencies
                )

            [pre-load] => Array
                (
                )

            [post-load] => Array
                (
                )

        )

    [installed] => 1
    [version] => 2.16.6
    [loaded] => 1
)
shendric’s picture

Hello,

Thanks for working with me on this. Sorry for the delay, but here's the drupal_debug.txt output.

Array
(
    [name] => iCalcreator
    [vendor url] => http://kigkonsult.se/iCalcreator/index.php
    [download url] => http://kigkonsult.se/downloads/index.php#icalcreator
    [version arguments] => Array
        (
            [file] => iCalcreator.class.php
            [pattern] => /define\( 'ICALCREATOR_VERSION', 'iCalcreator ([\d\.]+)' \);/
            [lines] => 100
        )

    [files] => Array
        (
            [php] => Array
                (
                    [iCalcreator.class.php] => Array
                        (
                        )

                )

        )

    [module] => date_ical
    [machine name] => iCalcreator
    [path] => 
    [library path] => 
    [version callback] => libraries_get_version
    [dependencies] => Array
        (
        )

    [versions] => Array
        (
        )

    [integration files] => Array
        (
        )

    [callbacks] => Array
        (
            [info] => Array
                (
                    [0] => libraries_prepare_files
                )

            [pre-detect] => Array
                (
                )

            [post-detect] => Array
                (
                    [0] => libraries_detect_dependencies
                )

            [pre-load] => Array
                (
                )

            [post-load] => Array
                (
                )

        )

    [installed] => 
    [error] => not found
    [error message] => The <em class="placeholder">iCalcreator</em> library could not be found.
    [loaded] => 
)
coredumperror’s picture

Looking at the differences between my output and yours, the only useful thing I see is that the "library path" attribute is missing on your output. In my attempts to get the same effect on my machine, I may have found your problem.

When I renamed my sites/all/libraries/iCalcreator folder to sites/all/libraries/iCalcreator-2.16.6 (the same name as you'd get if all you did was extract the iCalcreator zip file), then cleared my cache, I started seeing the same debug output you are. Unfortunately, I'm not seeing the strange "iCalcreator is installed, but can't load" behavior that you're getting, no matter what I do.

So, the only thing I can come up with as a potential solution is make sure that the exact path for iCalcreator.class.php is sites/all/libraries/iCalcreator/iCalcreator.class.php, then clear your site's cache. You can do that by either using drush cc all or logging in to your site and going to Configuration -> Development -> Performance and click the "Clear all caches" button.

I've searched out the documentation on the Libraries API module, to see if Date iCal is misusing its APIs. But as far as I can tell, Date iCal is using it correctly. So if the instructions above don't work, my only remaining idea is the "hit it with a hammer" approach: disabling, uninstalling, and deleting Date iCal and iCalcreator, and re-installing them from scratch.

I hope this helps.

shendric’s picture

Status: Active » Fixed

Hey,

Well, I cleared the cache (I could have sworn I had tried that already), and now it seems to be working. Thanks very much for your time on this, sorry it ended up being something that simple. Usually that's my mantra "Clear cache, if it's not working clear cache", but...anyway, my users will be thrilled to have that working.

Sean

coredumperror’s picture

I'm glad to hear that it's working now!

reg’s picture

FYI: I came across this but I installed the library after setting up a view. I found out that the libraries are cached so in that situation you need to clear the cache before an added library will be picked up.

coredumperror’s picture

Thank you for the heads up! I'll add that to the installation docs immediately.

Status: Fixed » Closed (fixed)

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