Entity list display is a EntityFieldQuery plugin for ctools.
Why?
In some projects I have need for something more simple than Views to make list of contents, a simple activate, click and configure list of content, that are reusable and exportable. The listings are independent of the database backend because the use of EntityFieldQuery.
Similar?
The are similiar projects with a more advanced setup, like Entitylist and EntityFieldQuery Views Backend. Entity List Display have a simpler setup, and less dependencies, and not so many features.
Usage
After you have activated the module you could use it on a panel page. Set up your page, add content to a pane. With the module activated, you now have a new category you could choose from, 'Entity List Display'. To insert a list of nodes on a pane choose 'Entity List Display - node'. You now have some settings you could do.
Your content type must have the view mode you choose for it activated, else it will just use the default.
With Display Suite or some other modules, or with code, you could create your own view modes.
This is my first attempt with a contrib module.
Project sandbox
http://drupal.org/sandbox/mikkeX/1335106
Repository
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/mikkeX/1335106.git
Version
Drupal 7
Reviews done of other applications
http://drupal.org/node/1445262#comment-5621146
http://drupal.org/node/1445414#comment-5621378
http://drupal.org/node/1444468#comment-5619118
| Comment | File | Size | Author |
|---|---|---|---|
| #65 | entity_list_display_pane_content_type.txt | 3.8 KB | barnettech |
| #44 | skitch1.jpg | 148.91 KB | barnettech |
Comments
Comment #1
bfr commentedCorrect git-line:
git clone http://git.drupal.org/sandbox/mikkeX/1335106.git entity_list_display
Also, run Coder module, it found few coding standards issues.
Comment #2
misc commentedThanks, updated after a coder run and corrected the git thingy.
Comment #3
bfr commentedAlso, correct your docblocks. This is the correct form:
Document ALL functions like this. You now have some totally undocumented functions and the rest are incomplete.
Please read this page:
http://drupal.org/node/1354
Comment #4
misc commentedThanks! Have now added some documentation in doxygen doc-style.
Comment #5
misc commentedUps, sorry, this one was wrong. Delete somebody?
Comment #6
misc commentedPut it back as needs review, posted fixed by misstake.
Comment #7
bfr commentedIf i do git clone, i do not receive your changes. Apparently you are working in a wrong branch.
Basically, the master branch is not used in drupal projects and should be empty and you should name your working branch as 7.x-1.x
Read this:
http://drupal.org/node/1015226
Also, there should be some documentation in the README.txt. I think if you copy the text from your project description, it's fine at this stage.
You can improve it later.
Comment #7.0
bfr commentedcorrected git with branch
Comment #8
bfr commentedEDIT:
Post contained personal information that needed to be removed. The issue itself was apparently fixed.
Comment #8.0
misc commentedCorrected git clone path
Comment #9
bfr commentedAlso, remove
from your .info file. It is only used for files that declare classes or interfaces.
Comment #10
misc commentedSorry, the link to the repo got wrong, it should be: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/mikkeX/1335106.git
EDITED
Comment #11
bfr commentedThe branch where you work daily can be dev or anything you want, but the actual dev branch has to be 7.x-1.x and that's the branch we would like to review here.
Comment #12
misc commentedThanks! Have corrected the issues you pointed out, I think.
Comment #13
bfr commentedOk the "dev" branch looks better(except for the branch name), but you have added some stuff there which need to be removed:
Those are added automatically by drupal.org in the packaging process.
Comment #14
bfr commentedOk, you added the correct branch, good. I'll continue the review tomorrow, it's 1:40 already here, got to get some sleep ;).
I'll change the status, if someone wants to take over.
edit: Most likely this is already RTBC, but i'll have to actually install the module first to see.
Comment #15
misc commentedOk, fixed.
Comment #16
misc commentedHave done some updates with the code.
Comment #17
doitDave commentedAutomated review (Please keep in mind that this is primarily a high level check that does not replace but, after all, eases the review process. There is no guarantee that no other issues could show up in a more in-depth manual follow-up review.)
Review of the 7.x-1.x-dev branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Manual review:
HTH, dave
Comment #18
misc commentedThanks, corrected the commenting and whitlines.
I think that I did right with the branching. There are now an empty master branch with README and a branch name 7.x.1.x.
Comment #19
doitDave commentedHi,
remember to switch the status back to "needs review" once you think it's time.
-dave
Comment #20
misc commentedThink it should be ready for review.
Comment #21
doitDave commentedHi, some few more automated review results:
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Manual review:
There are some branches you should remove: "taxonomies" and "7.x-1.x-dev".
Comment #22
misc commentedHi,
Thanks. Fixed the errors on line 106 and 139.
For the whitelines - I can not see that I have problems there.
The other branches I want to keep, but is it confusing, should I put them somewhere else?
Comment #23
misc commentedCould somebody install the module and try it out?
Comment #24
misc commentedAgain, sorry for repeating this, but could somebody just test this module out? It is easy to install and the functionality is easy to test.
Comment #25
misc commentedOne week later and I kindly repeat my question, could somebody install and review this module?
Comment #26
patrickd commentedStill some little formatting issues:
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
Comment #27
misc commentedThanks, but it seems meaningless to continue to just format the code if none still do not have a couple of minutes to test the code for real. I think I will just give up this approval thing and keep it in the sandbox.
Comment #28
patrickd commentedI tested it and it worked for me.
But there already is a module called entitylist (http://drupal.org/project/entitylist)
You can't use exactly the same module name for yours.
Rather then *kind of* duplicating you could also think about helping to make the entitylist module easier to setup (and then come back to the queue with more basic module), did you already tried to get in contact with the maintainers?
Your module is more complicated than most others in the queue, so please be patient.
As soon as all formatting issues are fixed, I think your module will be reviewed manually as soon as somebody has time to do it.
btw, I had similar problem here. my first module in the queue stuck for three months after I decided to create a simpler one that could make it (http://drupal.org/project/faqfield)
Comment #29
misc commentedThank you for trying it out.
Entity list display and Entity lists is not exactly the same name. Similar, bot not the same :-) Booth have names that describes what they do, like other modules with similar names - Field Views, Views Field View, Views Field, Views Pane (ctools) field, Premium Views Field ...(and so on... ;-)
The functionality is different - Entity lists "acts as an abstraction layer for different query builders or content list functionalities", Entity list display is not that, it is queries done by EntityFieldQueries. Maybe I should write that in the description? They have the same purpose, to list entities, but in a different approaches. Entity list is written by a colleague, dixon_, and I sure will do some work on it if I find things that I could add to it.
I try to be patient, but it is difficult when only get formatting feedback, it is like submitting a short story to a competition and the only answer you get is that you should another typeface and another indenting.... ;-)
Fixed the commenting.
Comment #30
patrickd commentedOh, I'm sorry somehow I didn't recognize the _list part. .. it was late yesterday ;-)
You know what? Code standarts got updated, your formatting throws errors again: http://ventral.org/pareview/httpgitdrupalorgsandboxmikkex1335106git
BUT these changes came by drupal 8 so I don't know if you must follow them yet.
Comment #31
misc commentedFixed the formatting issues.
Comment #32
misc commentedJust a friendly reminder, could some body install and test this module?
Comment #33
patrickd commentedSorry it seems like you got two application issues opened (http://drupal.org/node/1363104)
Unfortunatelly you can only hold one of these open, please close one of them!
(I'd suggest you to close the more recent one)
Comment #34
misc commentedOk, closed http://drupal.org/node/1363104
Comment #35
misc commentedSo, anybody that could test this one out?
Comment #36
misc commentedPlease, could somebody install and test this out?
Comment #37
misc commentedJust one of my weekly pleads for somebody to test and review the module :-) If you have ctools installed it should be really straightforward.
Comment #38
patrickd commentedit is best practice to review modules with the oldest 'last change' status first, if you always post into this issue it will maybe never get reviewed ;-)
sorry for the latency in the queue, the holidays take lots of time!
Comment #39
barnettech commentedIt looks to me like you have many branches and there should only be 7.x.1.x with all the code and then the master branch with nothing but a readme.
So you would have to delete the 7.x-1.x-dev branch, and I'm also seeing these branches:
2 weeks ago taxonomies
6 weeks ago postvar
6 weeks ago hard_coded_field_name
6 weeks ago hard_coded_field_name_with_context
I'm not sure what they are but probably they need deleting, or merge them first into 7.x.1.x
Comment #40
barnettech commentedneed to flip it to needs work for you to clean up the git tree as I say above.
Comment #41
misc commentedThose other branches are experimental projects that are used on work projects, with functionality that maybe is going to be implemented further on, and I really would like to have them there.
I am doing reviews myself, and I have not find where it says that it only should be a 7.x-1.x branch, just there should not be anything in the master branch. So help me on that :-) See also comment #11.
Comment #42
barnettech commentedsorry you are right actually: http://drupal.org/node/1015226
Comment #43
misc commented@barnettech no problem.
Comment #44
barnettech commentedFirst a minor point: in your readme you have a typo: "To insert a list of nodes on a panechoose Node entity list."
Now the part where I'm missing something perhaps, or maybe it's a reason to sharpen the readme so others don't loose time trying to figure this out, as I have.
When I create content for a panel I see your new option "entity list" which is very cool. But when I go and choose "node entity list" I get a box with just white / nothing in it (see attached screenshot). Now maybe I didn't configure the content type? Anyhow
1.) instead of just the white blank screen maybe there should be a drupal_set_message sort of alert telling the user to configure xy & z
2.) It's actually not clear to me if this is a bug or if I didn't configure something from the readme. Where do I choose what content types are to be used for this? Is that in fact why this isn't working for me? I could dig deeper, but I think highly of good documentation and want to kick this back as needs work for you to this this up. I promise to continue another review soon after :)
I'm waiting in the que as well with my Droogle project and know how you feel waiting for another review. I hope to be of some help here. Klausi has encouraged us to go for a review bonus to get our projects reviewed more quickly and I will promote his post here for you: http://drupal.org/node/1410826
Comment #45
misc commentedThat was interesting, which version of ctools do you have?
Documentation is crucial and hopefully I will get really understandable, I am going to work with that bit more.
Install and activate ctools, page manager, panels and entity list display
A walk though of the fucntionality:
Comment #46
barnettech commentedThe version of ctools is version = "7.x-1.0-rc1"
I do believe I followed your directions correctly but I get nothing but that white box that shows in the screenshot.
Comment #47
barnettech commentedHere is the error message i'm getting in watchdog:
location: http://drupal7:8888/panels/ajax/editor/add-pane/panel_context%3Apage-panel1%3Apage_panel1_panel_context/left/entity_list_display_pane/entity_list_display_pane
referrer: http://drupal7:8888/admin/structure/pages/nojs/operation/page-panel1/handlers/page_panel1_panel_context/content?render=overlay
message: Warning: Parameter 1 to entity_list_display_pane_content_type_edit_form() expected to be a reference, value given in drupal_retrieve_form() (line 785 of /Users/barnettech/Sites/drupal7/drupal7/includes/form.inc).
dunno if it's just a warning and unrelated to the problem.
Comment #48
misc commentedSeems that it reacts on (&$form, &$form_state) which seems strange... Do you have any problems with other ctools plugins? Like the examples that ships with ctools. Which version of php do you have? Do you get the same result if you turn overlay of?
Comment #49
barnettech commentedI looked at the code a bit. I notice on lines 14,15, and 16 of entity_list_display_pane.inc you have this:
you define category twice incorrectly? I don't see that this would stop it from working?, but just wanted to note it. Are you using the same exact code in your browser that you've posted to drupal.org ? I know I have to be careful that my module is in a different git repository and then I copy over files to drupal.org's git repository and I have to make sure all the little things I fix for drupal.org doesn't cause something to break inadvertently.
Comment #50
barnettech commentedI run: PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep 8 2011 19:34:00)
turning off overlay did not fix it.
ctools examples work fine. I just test out a few: like this one: http://drupal7:8888/ctools_ajax_sample/nojs/animal/sheep and I have:
Comment #51
misc commentedDid a minor update and removed the double category. Could you test and pull the repo again? My environment seem to be the same
Comment #52
barnettech commentedsorry still no luck. I also tried downloading views, enabling everything I could find under views and chaos tools, I was thinking maybe you have a dependency you don't realize you have. Perhaps you call a function that is actually part of a contrib module? Try installing your module on a base drupal7 install and see if it works for you. I also tried it in firefox to see if it was a browser problem. It didn't work in chrome or firefox. See if there is a dependent module you didn't realize should be declared in .info as a dependency?
Comment #53
misc commentedI have this running on several setups, so I really think this is strange... My develpment setup is real barebone:
Comment #54
misc commentedAlso changed to latest releases of ctools and panels (should not be any difference, but anyhow), instead of checking them out via git:
Same thing, works here... Curiouser and curiouser! (But pretty fun with strange problems :-))
Comment #55
barnettech commentedit is never calling this form function: entity_list_display_pane_content_type_edit_form
I put in a watchdog statement and verified it never gets called.
Comment #56
barnettech commentedwhat does this mean in your readme:
Ok found an article on it: http://mearra.com/blogs/juha-niemi/drupal-7-custom-node-view-modes
Comment #57
barnettech commentedanother typo: you wrote: "Sends the variables to to function that render the ouput." and you see you wrote the word "to" twice. Trying to find the bug, and just ran into this minor thing to report.
Comment #58
barnettech commentedI just read this tutorial and see some differences in how you write your module: http://www.batayneh.me/post/create-ctools-plugin-panels-drupal-7
you don't have a folder with your plugin name (in the tutorial they name their plugin "activities") and then their render callback and render form function names use the convention of
yours is:
so should there be a folder that the .inc file goes in called "pane_content_type" ?
I checked your module list I have all of those installed.
Comment #59
barnettech commentedI tried creating that folder, still no luck. neither entity_list_display_pane_content_type_edit_form or entity_list_display_pane_content_type_render are getting called.
Comment #60
misc commentedI really think that must be something in your setup that differs - today I enabled and used the module on four different machines - two of them Windows and one on Ubuntu 10.10 and another one on Ubuntu 8.04. Different versions of Apache, Mysql and php.
The module follows the standards of ctools-plugin. You can see examples in the ctools plugin example module.
Comment #61
misc commentedJust for testing - could you try this one also:
It uses the same format for the plugin, so it should be interesting if it works for you. Really appreciate your time and effort.
Comment #62
barnettech commentedI just ran through this tutorial and I come up with the same problem. http://www.nicklewis.org/drupal/tutorials/ctools-custom-content-types I'm flipping this to needs review until we see if its something about my installation.
Comment #63
barnettech commentedOk I got obsessed with making this work. I just installed it on an ubuntu box (previously I tested it on my mac) and in this drupal install, I come up with the same problem. I'll leave it as needs review so you can see if another reviewer has the same problem. Run drush up and update all your modules and core, do you have the problem? I checked, and all my stuff is up to date.
Comment #64
barnettech commentedCTools example no context content type works in panels for me, just tried it.
Comment #65
barnettech commentedI have verified you code does not work on my system by making my own plugin. The attached file which basically copies the ctools example works fine, so you'll need to identify the bug. If I have time I will help. My file which does work is attached. Also notice I changed the filename a bit to match the convention that ctools used in the example. I'm not sure if that is part of the problem.
Comment #66
klausiThe following git branches do not match the release branch pattern, you should remove/rename them. See http://drupal.org/node/1015226
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
manual review of the 7.x-1.x branch:
Comment #66.0
misc commentedchanged name on branch
Comment #67
misc commentedKlausi -thanks for the review, I will fix the issues and come back as soon as possible with answers on the qiestion :-) One question - branch naming it says:
I have no problem in deleting the dev one - but I really do not understand why I could not have a branch with that name? (also see comment 11 above)
Comment #68
klausiBecause "7.x-1.x-dev" can easily cause confusion as it is so similar to the correct name "7.x-1.x".
Regarding comment #11: I think bfr meant the name "dev" not "7.x-1.x-dev".
Comment #69
misc commentedCorrected the issues in #66.
The module is called Entity list display because os going to support listings of all entity types. This first version only support nodes.
Comment #70
misc commentedbarnettech - please check if you still have problems with it.
Comment #71
itangalo commentedJust saw this project demonstrated. Cool thing – an innovative (and useful) way of extending CTools.
My two cents: I have had a quick look at the code, and learned good things from it. Haven't looked close enough to say if things are "perfect", but as far as I can tell they are definitely good enough.
Comment #72
itangalo commentedAfter spending some more time with the module and its code, I'd like to add two things:
1) The function function entity_list_display_pane_content_type_edit_form() should not have ampersands ("&") with its parameters.
2) In _entity_list_display_output(), there are some lines (conditionally) adding a query against field_tags. These are not used by the module in its current state (but were used in the demonstration I saw today).
As said before, though, my humble opinion is that this code is well above the threshold of acceptable for a full project. MiSc demonstrates that he knows how to write good Drupal code – both in the style of writing and in the functionality he is implementing.
Comment #73
misc commentedThanks Itangalo.
1. I really think that I need both ampersands in entity_list_display_pane_content_type_edit_form.
2. Fixed that, accidental put dev code in the wrong branch.
Comment #73.0
misc commentedCorrected to version 7.x-1.x
Comment #74
misc commentedAdded review bonus tag.
Comment #75
klausimanual review:
Otherwise this looks RTBC to me. Removing review bonus tag, if there are still changes required you can add it again if you have done another 3 reviews of other projects.
Comment #76
misc commentedGreat! I changed the syntax to normal, so that should be no issue any more.
Comment #77
tim.plunkettThanks for your contribution! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Comment #78
misc commentedThank you, it was a pleasure :-)
Comment #79
darrell_ulm commentedMiSc: Congrats!
Comment #80.0
(not verified) commentedAdded some reviews
Comment #81
avpaderno