I set out looking for a module that would work similar to a spreadsheet pivot table. I could not really find something that i could readily use. My primary requirement was to be able to setup a matrix using hierarchial taxonomies for the x and y axes of the matrix. I am a newly initiated into Drupal and am using this module so that i can build something that is very specific to my needs while learning drupal module development. I would also really love to share this module with the community and build some friendships/interactions and get to know drupal better.
Please do let me know what needs to be done from my side to help elevate this sandbox project to a full project. I would like to get this a little more visibility so that i can get community feedback.
Comments
Comment #1
asrblr commentedhttp://drupal.org/sandbox/ajaneesh/1381316 is the project page and i have documented my vision for this module to a decent level of detail.
Comment #2
patrickd commentedwelcome,
There are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:
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. Go and review some other project applications, so we can get back to yours sooner.
Comment #3
asrblr commentedi have implemented all the changes that you have highlighted.
Please do let me know if there is anything more that i need to do.
AJ
Comment #4
patrickd commentedDon't forget to switch back to needs review after you think fixed all issues.
Comment #5
asrblr commentedfixed all issues, requesting review.
Comment #6
patrickd commentedscript.js
Filename and comment are not very informative at least some lines of documentation and inline-comments would not hurt .. ;-)
Spaces must be used to indent lines; tabs are not allowed, also in .js files.
.info
Stylesheets/scripts added here will be loaded on every page, is this really necessary?
Your README exceeds 80 characters and is quite unstructured. Please have a look at typical readme styles: http://drupal.org/node/447604
schema function:
Not null but and type integer but '' for default value ? Allowing NULL or setting 0 as default would make more sense here.
The description key is really for descriptions ;-). Tell us what this value is used for.
But in general I like this, especially the use of API looks good.
Comment #7
asrblr commentedthanks for the review patrickd (a review daemon? :) ). appreciate the comments. will work on this the minute i get back home from my day job ;) Should be able to close all of these within an hour or two.
Comment #8
asrblr commentedAll done.
hope the changes are satisfactory.
Comment #9
patrickd commentednot importand but just FYI, you don't have to set the package = Others in your .info as this is the default package anyway
drupal code sniffer has detected bad line endings (http://ventral.org/pareview/httpgitdrupalorgsandboxajaneesh1381316git)
Well, I asked you if it is really necessary to add the css by .info into every page. now you moved it into the formatter and widget hooks with
'every_page' => TRUE. Now it's again included on every page xD.My question was not rhetoric, I really wanted to know if and why you think it should be added on every page.
If you think it should be added on every page, adding it to the .info as it were before is probably the better way, otherwise you should leave the every_page option and only add the css contextual. For sure (on activated aggregation) showing it on every page would be better.
Seems to me like you got some unused pictures in your image folder. Will you need them soon or can some of them be removed as they'll never be used?
Your module has a functionality that is not probably not clear from the first moment for non-expert users. Some introductions in how to build a simple matrix would be nice to have here. (pro-active-support-issue-prevention ;) )
Line 395:
$nid = $form['nid']['#value'];You can not rely on the existence of the nid key here as the widget form will also be rendered as preview on the fields configuration.
Also default values set on the field configuration page are not saved yet, maybe you can find a way to make this work.
The taxonomy names are not check_plain()'ed before you print them out. As I can not imagine a sense for not filtering these values this should be done to prevent cross site scripting stuff.
Please test the functionality after you made changes, this field could never be saved as you defined a
valuesfield in your schema but use'value' => $item['value'],for saving it. Surely this results in a sql error.Also note that using the keyword "VALUES" in a sql query will never work as the database wont understand the syntax any longer.
So you got to change the table fieldname to value
Another problem is that using the multiple values option for the field does not work as the values of the first matrix will be used.
Furthermore even if multiple matrix field values are saved there will only be one matrix rendered by the formatter.
You really should implement this functionality! (To do so, make use of the $element[$value] array)
Please only push tested and working code as I had to work by try&fail to figure out whats wrong with your queries
regards
Comment #10
asrblr commentedpatrick,
appreciate the effort that you have put in and apologize for any annoyances that i may be causing you :) I am very new to drupal (module development atleast) and this project is very much a learning exercise for me.
i will need some time to fix the issues and in some cases, implement the functionalities that you have highlighted. I will take a breather before i get back to you.
I am still not written any code to handle multiple values, i was taking things slowly. I clearly misunderstood what full project access means. I was only hoping to get more visibility during my development phase so that i could make dev releases as my module would otherwise not show up in any kind of search. My module is clearly not ready for prime time usage and i was not planning on making any releases other than the -dev releases.
in reply to your concerns.
reg: package = Others
I honestly did not know this, have made a note of this thanks.
reg: 'every_page' => TRUE
again some lack of knowledge on my part, the reason i removed it from the info is because i did not want my css and js to be included merely because my module was activated without even a single field of my type ever created. my CSS is used both on the widget form as well as the rendered content (formatted view). ill research this and take a more informed decision.
reg: 'unused pictures'
i intend to use these in upcoming functionality based on where i stand today. but it may change in the future.
reg: pro-active-support-issue-prevention
i had put a screenshots link on my project page which i thought was fairly intuitive. dont know if youve had a look at that.
reg: $nid = $form['nid']['#value'];
again, lack of knowledge on my side, so far this has worked for me, based on your comments i guess i can expect to encounter some bugs very soon in certain scenarios. i will review this implementation immediately.
reg: check_plain()
will do this, did not occur to me as there are values that are captured by the taxonomy module not mine. but i get your point.
reg: value/values
this happened because i changed my implementation midway and created the table using a _update_xxx hook. i guess i introduced this error when i migrated to the hook_field_schema. I did not encounter this error as the table i continued to use was from the _update_xxx hook and i had not done a clean uninstall/install of the module. apologies. i thought i was always checking in tested code, this was a miss because of my refactoring.
reg: multiple values
i am yet to implement this. i was concentrating on getting the field up and running for a single value scenario.
i will take care of these things and post an update in a week or twos time.
Comment #11
patrickd commentedIt wasn't that bad at all as your module is quite an interesting thing to me ;)
I think some people probably don't understand the connection between taxonomy and the field from the beginning. That's why a short instructional howto would be nice.
Never ever trust the output of any module as Drupal's way to work is: "Save the original input but output it filtered"!
Only print things out raw if you are really sure that they are clean. Also make sure that the values you give put into arrays should also be checked if it will be handled raw. (for example the #description key for forms will be outputted without filtering)
If I'm not sure about a value I use, I put
'';!--"<>in. If it comes out unescaped, you know what's going on.Also I always test schema/update changes I made by installing it on a clean site and also on a site with the old version working.
At least before creating a release you should do this.
looking forward to your progress
Comment #12
asrblr commentedphew! fixed an annoying problem on reload of form due to validation errors. Introduced a tpl template for the widget rendering. feeling really good about fixing this, have a better understanding of the form workflows and the use of the $elements and $items arrays...
so far so good.
Also implemented support for multivalue. need to test thoroughly,
Still have some way to go before i am ready for review again. targetting the coming midweek... fingers crossed, hope i get a good 10 hours of work into this over the weekend.
Comment #13
asrblr commentedComment #14
Ingmar commentedI'm really looking forward to seeing the results!
Comment #15
Ingmar commentedSo...how are things going? Keep up the good work.
Comment #16
asrblr commentedIngmar, thanks for your continued interest. I have been struggling with some hectic times at my day job (which also coincidentally included evaluating wordpress!). I am also trying to make a small beginning with a website of my own. I desperately need the vocab matrix plugin for making the ideas in my head a reality. I am jumping back into my drupal activity with renewed vigor and i want to get some kind of simple website in place within 15 days so you will definitely see some activity in the coming days.
Comment #17
Ingmar commentedGreat to hear (not about the hectic times at your day job off course:) ). I'm very curiuos about the first results:)
Comment #18
Ingmar commentedHey, it's been a while since you commited. How are things going? You seemed to be on the verge of finishing your project...
Comment #19
Ingmar commentedI think the module was almost ready to be released, but then development was stopped. How can this module be finalized?
Patrickd, you said the module was interesting for yourself as well and you did some review on it. Is there still much work to do to get this production-ready, you think?
Comment #20
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
Comment #21
s.daniel commented@see: Similar Module http://drupal.org/project/views_matrix