Closed (won't fix)
Project:
Openlayers
Version:
7.x-2.x-dev
Component:
OL API
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2010 at 21:47 UTC
Updated:
2 Sep 2014 at 19:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tmcw commentedHuh? It's quite important to read the documentation of the relevant modules - here's the API for features which explains what we need to do.
Comment #2
zzolo commentedLike I said, those were just some initial thoughts. But more importantly, your comment basically suggests that exports are not supported without Features. So, if someone wants to export a preset and import it in the interface or in their own code, then it could break because they have not transferred over a module. If this is the case, then we should add Features as a dependency. Maybe I am confused about something here.
Comment #3
tmcw commentedNot quite. Exports through the UI are supported regardless and missing pieces should be (and are) detected when you try to build a map without the requisite modules. But simulating the module requirement system *within the export code* is not a good idea, since exports != modules. Thus the integration with features is required for features, not pure exported code, because pure exported code will never be able to handle dependencies in a clean way.
Comment #4
zzolo commentedI just want to be clear about all this. How are missing pieces detected and how would the user know about them? I would assume that Ctools does some checking, but as far as I can see in the code we are not telling the user about this. So, if someone has a map that refers to a behavior that is not installed, then that behavior just doesn't show up? So, overall what you are saying is that Behaviors are and will not be exportable (without Features) and no module dependency code is or should be implemented?
Comment #5
tmcw commentedAs before, behaviors are not exportables and therefore are not exportable. Functional code is not exportable and should not be. I think that Ctools throws an error when behaviors are not found - I will check this in a bit.
Comment #6
zzolo commentedChanging title. So, given all this information, we need to make sure that if a layer type or behavior is used and the module that creates is not present, then some how the user is notified.
One question is, do we continue to render the map in case of this sort of error?
Comment #7
tmcw commentedHere's a patch that makes sure that modules which provide layer types are included as dependencies in exports including generated layers with those layer types. Please test and review.
Comment #8
zzolo commentedShouldn't the function name be
function openlayers_features_export, at least this is what I would assume form the name of the hook.Also, not trying to be a jerk, but it would be cool if you provided patches with
cvs diff -upso that myself and others that use Dreditor can more easily review patches.Comment #9
tmcw commentedNo, the hook is called per-export type, so it is called based on the export name. Thus layers.
Here's a patch made with -up.
Comment #10
tmcw commentedComment #11
zzolo commentedThanks for the -up. I don't know too much about the features hook. From just a visual review, the logic looks sounds.
Looks like there is a double semi-colon:
I should be able to apply it and try it out over the weekend.
Comment #12
tmcw commentedInitial commit: http://drupal.org/cvs?commit=361622
Still needs presets->behavior plugin dependencies.
Comment #13
tmcw commentedThe initial commit breaks exports of multiple layers; I misknew the Features module implementation here. Here's a patch that should fix that behavior.
Comment #14
Will White commentedThis patch removes the problematic code block as a stop gap solution.
Comment #15
tmcw commentedOkay, committed: http://drupal.org/cvs?commit=366128
Comment #16
zzolo commentedChanging title for accuracy.
Comment #17
zzolo commentedtagged as beta blocker
Comment #18
zzolo commentedMarking for 7.x and minor.
Comment #19
zzolo commentedClosing. Don't see this getting any attention in the near future.