Download & Extend

Utilize CTools Export UI

Project:OpenLayers
Version:7.x-2.x-dev
Component:Code
Category:task
Priority:minor
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

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.

#2

Status:postponed» active

Patch is now committed :)

#3

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)?

#4

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 :)

#5

tagged as beta blocker

#6

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.

#7

Title:Utilize CTools export UI (when released)» Utilize CTools Export UI

#8

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

Moving to D7.

#9

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

#10

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

#11

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

#12

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.

#13

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 !

#14

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

#15

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.

#16

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 ?

#17

First patch.

The "Layers" part is not yet done.

AttachmentSizeStatusTest resultOperations
0001-Use-CTools-Export-UI-for-Maps-Styles.patch35.58 KBIdleFAILED: [[SimpleTest]]: [MySQL] 230 pass(es), 8 fail(s), and 0 exception(s).View details

#18

Status:active» needs review

#19

Status:needs review» needs work

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

#20

Status:needs work» needs review

Layers part is done.

AttachmentSizeStatusTest resultOperations
0001-814220-Use-CTools-Export-UI-for-Layers-Maps-and-Styl.patch30.46 KBIdleFAILED: [[SimpleTest]]: [MySQL] 169 pass(es), 100 fail(s), and 0 exception(s).View details

#21

Status:needs review» needs work

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

#22

Status:needs work» needs review

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

AttachmentSizeStatusTest resultOperations
0001-814220-Use-CTools-Export-UI-for-Layers-Maps-and-Styl.patch51.68 KBIdleFAILED: [[SimpleTest]]: [MySQL] 198 pass(es), 40 fail(s), and 8 exception(s).View details

#23

Status:needs review» needs work

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

#24

Status:needs work» needs review

Add 'Clone' for Layers.

AttachmentSizeStatusTest resultOperations
0001-814220-Use-CTools-Export-UI-for-Maps-Layers-and-Styles.patch51.58 KBIdleFAILED: [[SimpleTest]]: [MySQL] 198 pass(es), 40 fail(s), and 8 exception(s).View details

#25

Status:needs review» needs work

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

#26

This patch breaks a lot of tests.

#27

  • 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.

#28

Fixed a couple of bugs and enabled the machine name.

WIP: http://www.webpagescreenshot.info/img/668441-832012103806AM

AttachmentSizeStatusTest resultOperations
0003-Issue-814220-Use-CTools-Export-UI-for-Layers-Maps-an.patch53.66 KBIdleFAILED: [[SimpleTest]]: [MySQL] 189 pass(es), 49 fail(s), and 0 exception(s).View details

#29

Status:needs work» needs review

#30

Status:needs review» needs work

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

#31

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
0001-Issue-814220-Use-CTools-Export-UI-for-Layers-Maps-an.patch60.04 KBIdleFAILED: [[SimpleTest]]: [MySQL] 237 pass(es), 1 fail(s), and 0 exception(s).View details

#32

Status:needs review» needs work

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

#33

Status:needs work» needs review

Looks like we have winner here !

AttachmentSizeStatusTest resultOperations
0001-Issue-814220-Use-CTools-Export-UI-for-Layers-Maps-an.patch60.23 KBIdlePASSED: [[SimpleTest]]: [MySQL] 238 pass(es).View details

#34

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.

AttachmentSizeStatusTest resultOperations
0001-Issue-814220-Use-CTools-Export-UI-for-Layers-Maps-an.patch65.73 KBIdlePASSED: [[SimpleTest]]: [MySQL] 238 pass(es).View details

#35

This patch enable the preview button for the Styles.

AttachmentSizeStatusTest resultOperations
0001-Issue-814220-CTools-Export-UI.patch65.31 KBIdlePASSED: [[SimpleTest]]: [MySQL] 238 pass(es).View details

#36

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..

AttachmentSizeStatusTest resultOperations
0001-Issue-814220-CTools-Export-UI.patch65.27 KBIdlePASSED: [[SimpleTest]]: [MySQL] 238 pass(es).View details

#37

This patch enable preview for Maps.

AttachmentSizeStatusTest resultOperations
814220.diff.patch45.5 KBIdleFAILED: [[SimpleTest]]: [MySQL] 169 pass(es), 108 fail(s), and 0 exception(s).View details

#38

Status:needs review» needs work

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

#39

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
0001-Issue-814220-Enable-CTools-Export-UI.patch67.3 KBIdlePASSED: [[SimpleTest]]: [MySQL] 238 pass(es).View details

#40

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.

#41

Status:needs review» fixed

Committed.

#42

Yay! :)

#43

Status:fixed» closed (fixed)

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

#44

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.

#45

Status:needs work» closed (fixed)

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

#46

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.

#47

Status:needs work» fixed

#48

Status:fixed» closed (fixed)

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

nobody click here