Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
#787644: Export UI - unified ui for exportables is in CTools DEV. It's also integrated with wizard.inc, so it's really easy to create complex UI.
See message module for a 'simple' exmaple, or ctools_custom_content from one with a wizard.
ping me on IRC if you need help.
Comment | File | Size | Author |
---|---|---|---|
#36 | 0001-Ctools-export-UI-update-for-6.x-3.x.patch | 61.61 KB | kylebrowning |
#33 | 0001-Ctools-export-UI.patch | 63.04 KB | kylebrowning |
#32 | 0001-Ctools-export-UI.patch | 48.77 KB | kylebrowning |
#27 | 0001-Various-Ctools-Fixes.patch | 48.22 KB | kylebrowning |
#26 | 0001-Various-ctools-fixes.patch | 48.2 KB | kylebrowning |
Comments
Comment #1
amitaibu[edit: deleted double posting]
Comment #2
amitaibuPatch moves all custom code from admin.inc into CTools' export-ui
plugin.
It should be working but I haven't fully tested since I'm not yet
familiar enough with Services. . I've set it to needs review, though, so
it will get attention, although it might need a bit more polish.
I don't think I'll have more time to spend on this patch, but I hope and
believe -- since all pieces are in place -- it will help the maintainers
finalizing it. I'll of course be here for questions.
After applying patch, cache clear, navigate to admin/build/services and
be pleasantly surprised... :)
Comment #4
amitaibuI was thinking that another possible is to use the wizard to add the resources and authentication -- sounds like a better usability.
Comment #5
voxpelli CreditAttribution: voxpelli commentedSubscribing to keep track so that this doesn't get lost :)
Comment #6
kylebrowning CreditAttribution: kylebrowning commentedThe export UI is currently working in 3.x-dev
Comment #7
voxpelli CreditAttribution: voxpelli commentedThis is not in Services 3.x - restoring status.
Comment #8
kylebrowning CreditAttribution: kylebrowning commentedSoo, bumping this to 7.x
We now have a feature branch located here, http://drupalcode.org/project/services.git/shortlog/refs/heads/master-ct...
I have started moving this over AND updating the UI saving resources.
Comment #9
dixon_Interesting, subscribing
Comment #10
kylebrowning CreditAttribution: kylebrowning commentedOk, heres a new patch, needs review.
This updates Services to use ctools export UI.
Comment #11
kylebrowning CreditAttribution: kylebrowning commentedEek, updated patch
Comment #12
marcingy CreditAttribution: marcingy commentedI haven't tested this patch functionally but from a eyeballing we are missing doxygen in a number of place and some @param values are missing types. Yes I realise this is a nip pick in some ways but documented code is good code ;)
Comment #13
kylebrowning CreditAttribution: kylebrowning commentedOk, heres updated patch with some more comments.
Comment #14
ygerasimov CreditAttribution: ygerasimov commentedHere is same patch without trailing spaces. I will do more precise review with corrections in #1096316: Resource UI is lacking a good UX
Comment #15
kylebrowning CreditAttribution: kylebrowning commentedComment #16
ygerasimov CreditAttribution: ygerasimov commentedafter installing module I get error:
Here is amended patch to fix this problem.
Comment #17
ygerasimov CreditAttribution: ygerasimov commentedAdded hook_requirements to check version of CTools.
Comment #18
gddSome more comments after trying this out.
- I don't understand why we need both a 'Name' and a 'Endpoint Name' when creating a new endpoint. They are both supposed to be unique so what's the point?
- When I create a new endpoint and enter 'test' for all fields, REST as server, and click either 'Save' or 'Save and proceed' I get the following PDO error, although the endpoint does actually get created. This also happens if you Clone or Import an endpoint.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY': INSERT INTO {services_endpoint} (eid, name, title, server, path, authentication, resources, debug) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => test [:db_insert_placeholder_2] => test [:db_insert_placeholder_3] => rest_server [:db_insert_placeholder_4] => test [:db_insert_placeholder_5] => a:0:{} [:db_insert_placeholder_6] => a:0:{} [:db_insert_placeholder_7] => 0 ) in drupal_write_record() (line 6774 of /Users/gdd/htdocs/services_7/includes/common.inc).
- What is the difference between 'Save' and 'Save and Proceed'?
- When I go to edit a service I have two Save buttons.
- When saving the Resources page I get the following notice
Notice: Trying to get property of non-object in services_endpoint_save() (line 268 of /Users/gdd/htdocs/services_7/sites/all/modules/services/services.module).
- Didn't we used to have a List tab so you could get back to the endpoint index without going to the breadcrumb?
Comment #19
gddSo for the record, I just tried #17 out with a fresh install, a new checkout of the 7.x-3.x branch, and alpha3 of CTools, and I am still getting these same results.
Comment #20
kylebrowning CreditAttribution: kylebrowning commentedUpdates CTOOLs patch
Fixes tests, Resources page errors, Various Submit buttons, and rollls all the previous patches into one.
Comment #21
ygerasimov CreditAttribution: ygerasimov commentedI have enabled services module only on fresh install. When I try to create endpoint I don't have any choice in Server selecbox (that is right as I haven't enabled any servers). But when I submit and get validation error I also have error
Warning: implode() [function.implode]: Invalid arguments passed in form_error() (line 1576 of /var/www/services/d7/includes/form.inc).
I also get this error when enable rest server and create endpoint (no validation errors).
I have managed to create endpoint with name that has spaces and capital letters. I believe this should be impossible. But in my case validation accepted this.
I have also tried to export / import endpoint. This worked fine.
What is really needed is to have validation on path as I exported / imported same endpoint with change of name but not changing path. So it happened to exist two endpoints with same pathes.
Comment #22
kylebrowning CreditAttribution: kylebrowning commentedUpdated patch address issues in #21
Comment #23
kylebrowning CreditAttribution: kylebrowning commentedComment #24
ygerasimov CreditAttribution: ygerasimov commentedAfter I import the endpoint I can't save it. I get all the time error
The export id can only consist of lowercase letters, underscores, and numbers.
Screenshot: http://skitch.com/ygerasimov/rsqea/selection-014
This happened after I named endpoint with capital letters, exported it and tried to import.
Comment #25
kylebrowning CreditAttribution: kylebrowning commentedIM not able to reproduce this :(
Comment #26
kylebrowning CreditAttribution: kylebrowning commentedOk, this seems to be a CTOOLs bug, ill open a patch over there when I get to one, but theres a new patch to be applied to 7.x-3.x
Comment #27
kylebrowning CreditAttribution: kylebrowning commentedOK, heres a patch that should fix the Uppercase issues. Endpoint names must follow ctools primary key naminving convention of lowercase 0-9 and underscores.
Comment #28
ygerasimov CreditAttribution: ygerasimov commentedWorks much better. I haven't found any bugs.
Comment #29
ygerasimov CreditAttribution: ygerasimov commentedSet to RTBC
Comment #30
kylebrowning CreditAttribution: kylebrowning commentedGonna let hejrocker do one more pass, then Ill commit.
Comment #31
marcingy CreditAttribution: marcingy commentedI have some concerns about services_edit_form_endpoint_resources_submit as there are variable names such as $c being used. I simply can't tell what on earth is going on that function because we don't have meaningful names.
Is this code correct
As we are setting preprocess in both cases.
Looks like we have a typo.
Do we need dynamic queries in services_ctools_export_ui_form_validate or can we just use dbquery with placeholder? I think we can but I'm not 100% certain.
Can we do an isset rather than checking for key exists as this is more performant
Comment #32
kylebrowning CreditAttribution: kylebrowning commentedUpdated patch fixing marcingy's comments
Comment #33
kylebrowning CreditAttribution: kylebrowning commentedWoops, updated patch, my bad
Comment #34
kylebrowning CreditAttribution: kylebrowning commentedComment #35
kylebrowning CreditAttribution: kylebrowning commentedComment #36
kylebrowning CreditAttribution: kylebrowning commentedhers 6.x version of the ctools update
Comment #37
kylebrowning CreditAttribution: kylebrowning commented