The way the behaviors are declared causes CTools to fail at locating them: it only gets the 'class' and 'parent' subkeys, and builds a (name).class.php file name, which does not exist because the files are named (class).inc.

copying the 'path' and 'file' keys below the 'behavior' key in _openlayers_openlayers_behaviors() allows CTools to load them from their declared file and installation to succeed.

Comments

fgm’s picture

Status: Active » Needs review
FileSize
1.02 KB

Suggested patch for those who still have to use 7.x-2.0-alpha2 instead of more recent versions.

Status: Needs review » Needs work

The last submitted patch, 0001-Fix-the-path-file-declaration-for-behaviors.patch, failed testing.

Pol’s picture

It's funny because I'm working on that stuff for #1895530: Use the new 'openlayers' element. and #1897328: Implement ctools_plugins_directory for OpenLayers.

I would like to be able to autoload JS and CSS file related to a behavior or a class, but that implies to have them correctly defined.

I don't like to have to define them in the plugin definition, I think it would be better if we can find a way to detect the class filename and autoload JS and CSS from it.

For your patch, you should use the 7.x-2.x-dev branch !

fgm’s picture

Hi: I think this has been fixed in later versions (although I didn't checkà, but for compatibility reasons (OL taxonomy), we needed to use alpha2 and not a more current version. Hence the patch agains alpha2 instead of 2.x. Maybe it can help with later versions too...

Pol’s picture

It's also in my todo list to fix the OpenLayers Taxonomy module, if you can tell me what's wrong, I can work on it!

fgm’s picture

Status: Needs work » Needs review
FileSize
1.03 KB

Maybe there's some funky reference reuse in the patch... retrying a bit differently.

Status: Needs review » Needs work

The last submitted patch, 0001-Fix-the-path-file-declaration-for-behaviors.patch, failed testing.

fgm’s picture

Status: Needs work » Needs review
FileSize
1.05 KB

Actually, as MacWeber noticed, I forgot the return $ret at the end.

Pol’s picture

I think it would be a good idea to fix OpenLayers Taxonomy too, if you can provide some informations about what's not working with the latest beta, I can try to fix it !

Mac_Weber’s picture

@Pol OL Taxonomy is outdated and returning many errors.
If you install it and test with the included demo Feature you can see the error messages going to OL maps listing page.

If you are available on IRC we can chat better there.

Mac_Weber’s picture

Status: Needs review » Reviewed & tested by the community

Patch #8 fix the issue on OL alpha2 and make it possible to use OL Taxonomy.
Some error messages are still being returned from OL Taxonomy, but they have nothing to do about this bug report.

Pol’s picture

Status: Reviewed & tested by the community » Fixed
fgm’s picture

Hmm, I don't see something like my patch in the commit log. Did you fix it another way ?

Pol’s picture

This doesn't exists anymore in 7.x-2.x.
Each behaviors are not defined in a file and even the function _openlayers_openlayers_behaviors() doesn't exists.

fgm’s picture

Ah, great ! Thanks for the followup.

Status: Fixed » Closed (fixed)

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