Just a heads up/ FYI #787644: Export UI - unified ui for exportables . We need to make sure Openlayers can implement it's needs as-well..

Status

  • Openlayers Maps: 100%
  • Openlayers Styles: 100%
  • Openlayers Layers: 100%
  • Code cleanup, remove useless hooks and menu entries: 50%
  • 'name' field is not a machine name, automatically filled up with the title.
  • Fix tests: 100%

Openlayers Maps

The UI is working, the operations: Add, Edit, Delete, Clone are working perfectly.
Screenshot WIP: http://www.webpagescreenshot.info/img/15181-83201235142PM and http://www.webpagescreenshot.info/img/163362-83201282023PM

Openlayers Styles

The UI is working, the operations: Add, Edit, Delete, Clone are working perfectly.
Screenshot WIP: http://www.webpagescreenshot.info/img/697743-83201235249PM

Openlayers Layers

The UI is working, the operations: Add, Edit, Delete, Clone are working perfectly.
Screenshot WIP: http://www.webpagescreenshot.info/img/486222-83201235215PM

Bugs

  • Solved: When I try to edit or add a layer, I get the following: PHP Fatal error: Class 'openlayers_views_vector' not found in .... (did you have the openalyers_views module on when you made the patch? If I turn it off, it works alright.)
  • Solved: I was ale to save a layer that had no name, machine_name, description, or layer type.
  • Solved: Should fix tests.
  • Solved: Various warnings.
  • Solved: There's no Preview button on styles.
  • Solved: There's no Preview button on maps.
  • Solved: Not a big deal, but the higher level menu items don't persist when you add, edit, save and item.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zzolo’s picture

Title: CTools export UI » Utilize CTools export UI (when released)
Priority: Normal » Minor
Status: Active » Postponed

Thanks @Amitaibu for the heads up. It looks exciting. Marking as postponed until there is a solid release with this new code.

amitaibu’s picture

Status: Postponed » Active

Patch is now committed :)

zzolo’s picture

Thanks @Amitaibu. I think its best if we do not include this until a release of CTools has this change in there. Also, is there any documentation on how to implement this (as opposed to trying to piece it all together with issue comments and code)?

amitaibu’s picture

1) Help file.
2) You can see the panels-stylizer plugin in the Panels DEV package, to see how the base class of the plugin can be extended.
3) Ping me on IRC :)

zzolo’s picture

Issue tags: +beta blocker

tagged as beta blocker

tmcw’s picture

Issue tags: -beta blocker

I don't think that this should be tagged as beta blocker. It's a great step, and I've started work on very large patch that moves styles to export-ui. But, the development that's needed here is the kind of stuff that's suited for a 2.1 or a dev branch of sorts: this is not the kind of thing we want to 'finish up' before releasing a beta, it's something that we should do after that.

tmcw’s picture

Title: Utilize CTools export UI (when released) » Utilize CTools Export UI
zzolo’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

Moving to D7.

nod_’s picture

status on that ? Is it the same thing as clone/edit/add links ?

zzolo’s picture

Yeah, CTools provides some UI help for exportable objects. We should utilize this.

Pol’s picture

If this is the same thing as the links add/edit/clone, we can close the issue ?

zzolo’s picture

It is those links and more, but CTools provides a lot of code for this that can be utilized. It's not really a high priority but it should cut back on the amount of code.

Pol’s picture

I think we really should dig up in that direction.

Do you have a module who can be an example of what to do ?

Thanks Alan !

zzolo’s picture

Here's some stuff. I haven't looked at it in awhile so not sure how documented it is.

http://www.sthlmconnection.se/blog/exportable-configuration-ctools-revis...
http://drupal.org/node/855392

Pol’s picture

Very interesting to get started too: http://drupal.org/project/ctex

Work in progress: http://www.webpagescreenshot.info/img/29311-822012102242AM

Now I have to find how to add this page in replacement of the default Maps tab.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Things are moving, Maps and Styles are almost done it's working perfectly until now.

The last part is the Layer part.

We need to think further for the 'Add New Layer' form.
Currently we have a 'in-between' page where we have to select the kind of layer to add.
How to do that using CTools Export UI framework ?

Pol’s picture

First patch.

The "Layers" part is not yet done.

Pol’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 0001-Use-CTools-Export-UI-for-Maps-Styles.patch, failed testing.

Pol’s picture

Status: Needs work » Needs review
FileSize
30.46 KB

Layers part is done.

Status: Needs review » Needs work

The last submitted patch, 0001-814220-Use-CTools-Export-UI-for-Layers-Maps-and-Styl.patch, failed testing.

Pol’s picture

Status: Needs work » Needs review
FileSize
51.68 KB

Patch with the files. I forgot them in the previous one.

Status: Needs review » Needs work

The last submitted patch, 0001-814220-Use-CTools-Export-UI-for-Layers-Maps-and-Styl.patch, failed testing.

Pol’s picture

Status: Needs work » Needs review
FileSize
51.58 KB

Add 'Clone' for Layers.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Status: Needs review » Needs work
zzolo’s picture

This patch breaks a lot of tests.

zzolo’s picture

  • When I try to edit or add a layer, I get the following:
    [02-Aug-2012 17:12:20] PHP Fatal error:  Class 'openlayers_views_vector' not found in /Users/zzolo/Code/mamp/openlayers/sites/all/modules/openlayers/modules/openlayers_ui/includes/openlayers_ui.layers.inc on line 48
    
  • Did you have the openalyers_views module on when you made the patch? If I turn it off, it works alright.
  • There's no Preview button on maps or styles anymore.
  • I was ale to save a layer that had no name, machine_name, description, or layer type.
  • Should fix tests.
  • Not a big deal, but the higher level menu items don't persist when you add, edit, save and item.
  • Various warnings.

Its pretty awesome how much functionality you can get out of this. It's definitely getting there, but there are still some rough edges.

zzolo’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Pol’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 0003-Issue-814220-Use-CTools-Export-UI-for-Layers-Maps-an.patch, failed testing.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Status: Needs work » Needs review
FileSize
60.04 KB

Status: Needs review » Needs work

The last submitted patch, 0001-Issue-814220-Use-CTools-Export-UI-for-Layers-Maps-an.patch, failed testing.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Status: Needs work » Needs review
FileSize
60.23 KB

Looks like we have winner here !

Pol’s picture

New patch, remove useless functions, cleaned up a bit.

I added the missing columns in the tables, so it looks like the version without the patch. Screenshots are updated.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

This patch enable the preview button for the Styles.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Remove #id property in the forms if the machine name is after the source field.

See #990218: Machine name field throws notices if before source field..

Pol’s picture

FileSize
45.5 KB

This patch enable preview for Maps.

Status: Needs review » Needs work

The last submitted patch, 814220.diff.patch, failed testing.

Pol’s picture

Status: Needs work » Needs review
FileSize
67.3 KB
Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

New patch, including a new update function to rebuild the menu_links and fix the breadcrumb.

Fixed by Dave Reid during the Drupalcon Munich 2012.

Pol’s picture

Issue summary: View changes

Updated issue summary.

Pol’s picture

Status: Needs review » Fixed

Committed.

jeffschuler’s picture

Yay! :)

Status: Fixed » Closed (fixed)

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

jeffschuler’s picture

Status: Closed (fixed) » Needs work

Layer options are no longer loaded and shown in the layer edit form.

For instance, save a GeoJSON layer then re-edit it. The URL, Data, and UseBBOX settings don't load.

friedjoff’s picture

Status: Needs work » Closed (fixed)

There is already #1761768: Layer options don't load with a patch.

Pol’s picture

Status: Closed (fixed) » Needs work

I spotted a nasty bug and I have no idea on what's the way to solve it, probably because I need to sleep ;-)

Before using CTools Export UI, forms where using custom submit functions. In this case, this is the layer form in OpenLayers 7.x-2.0-beta2.
OpenLayers was handling the way in which objects were stored in the database.

Now that the form submit is handled by CTools, those functions are useless.
It means that the save() method is no more called, CTools takes care to save the object into the DB and AFAIK, it's not possible to alter the data before saving them (correct me if I'm wrong).
It also means that the class openlayers_layer_type is no more overridable by other modules, like MapBox (Only for the save() method).

MapBox transforms the urls textarea into an array before saving the layer. This is no more working with our CTools implementation.

This is why we have bugs like this and it's the first, I'm pretty sure that there are others.

I need your feedback on this.

Pol’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.