Closed (fixed)
Project:
Checkall
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Aug 2010 at 10:22 UTC
Updated:
8 Feb 2016 at 00:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mgiffordYup. I'm curious about that too!
Comment #2
markus_petrux commentedSure. Though, I'm not sure when I'll have the time.
If you're interested, I would be happy to grant maintainership access to anyone of you, both.
Comment #3
mgiffordThanks. I wish I had the time to take it on.
If I need to upgrade it myself I'll certainly post a patch. And thanks if and when you do get the time. Not easy to do.
Comment #4
sachbearbeiter commentedinto core
Comment #5
breos commentedHello all
I have tried to port this to D7, this are the steps I have done:
checkall.module
Line 116
Before
$element['#attributes']['class'] = 'form-checkall '. $class;After
$element['#attributes']['class'] = array('form-checkall '. $class);Line 119
Before
$element['#attributes']['class'] .= ' form-checkall '. $class;After
$element['#attributes']['class'] .= array(' form-checkall '. $class);Line 129
Before
$element[$key]['#attributes']['class'] = $class;After
$element[$key]['#attributes']['class'] = array($class);Line 132
Before
$element[$key]['#attributes']['class'] .= ' '. $class;After
$element[$key]['#attributes']['class'] .= array(' '. $class);checkall.js
Addded
(function ($) {at the start of the code and
})(jQuery);at the end of the code
Modified behaviors function:
Before
After
References about this change:
http://drupal.org/node/756722 (see BEHAVIORS)
And now the last change, all references to
Drupal.settings.checkall have been change to settings. only
Example:
Line 27 was:
Now is:
Obviusly, you will have to change the checkall.info to work in D7 too :-P
I know this is not a patch and pershaps has a lot of bugs, but Im not a developer.
If someone with more knowledge can check this, I'm sure a lot of us will be very grateful
Hope this helps you all who needs this module working in D7 and thanks a lot to Markus for develop it to D6
Comment #6
klonos...less vague title + proper tags.
Comment #7
avpadernoThe title is not vague. This is a support request that is asking to the maintainer if he has planned to make a Drupal 7 version of the module. To my question, the current maintainer has already replied; for this reason, this report could be closed as fixed.
I had two modules that used the Checkall module, but I removed the code using it because of the absence of a Drupal 7 version.
When I will have time, I will check if I can covert the module for Drupal 7; in that case, I will probably ask to become co-maintainer, once I tested the code.
Comment #8
klonos...sorry Alberto, by "vague" I was referring to the issue's title not mentioning which project it is for. Have you tried how a bunch of "D7 port?" issues for various projects look in your dashboard when they actually don't mention what project they are for?
Comment #9
breos commentedHello
I have donde a patch for the version 6.x-2.4
Try it and let me know if it works, please
For install the patch:
-Download the 6.x-2.4 Version
-Unzip it and open a console in the unzipped dir
-Copy the patch to the unzipped dir and execute
patch -p1 < checkallportD7.patchGood luck
Comment #10
avpaderno@klonos Well, in few cases the name of the module is added to the issue title; one of those cases is when the issue is about a module being abandoned, or about taking over an existing module. Do you see the word "Drupal" in the title of all the issues opened for Drupal core?
Comment #11
klonos@kiamlaluno: go to your Drupal.org dashboard and make sure the "Your posts" block is enabled. Now, subscribe or post something in a few of the hundreds issues about porting modules/themes to D7. Take a look at your dashboard and imagine all of these posts having no specific project name in their title. It would look something like this. Try to figure out to which project they refer to simply by looking at the issue titles.
...having fun with those issues that do not include the project name?
Now, the same thing in the issue queue is entirely different since it includes project names in a separate column of their own.
Comment #12
pfrillingI can confirm that breos' patch in comment #9 works.
Comment #13
sunwukong commentedwhy breo's patch does not work for me ...
Comment #14
klonosWhat is not working? What version of the module are you trying to patch? Does the patch apply successfully? If not, did you try applying it manually?
Comment #15
Mihai Chiriac commented#9 worked for me also.
I've attached the patched module for those who struggle with patching.
Comment #16
mgiffordOk, it would be good to get this into a release and close this issue.
Has anyone run it through Coder to do a quick sanity check?
Has anyone reached out to the maintainer? Do they have any concerns? I hope we don't need a new maintainer, but we should be asking that question.
Comment #17
naeluh commentedHey I cannot get this module to work?
Is there supposed to be an option in the field setting with this version?
thanks,
Nick
Comment #19
warmth commentedSubscribed!
Comment #20
albert9000 commentedI'm totally interested in this. I'd like to see this go live.
Comment #21
nolosejoder commentedI think one of the errors is in checkall_widget_settings_alter(), that it does not exist in drupal 7 (http://drupal.org/node/982764).
It must be used hook_field_widget_properties_alter (http://api.drupal.org/api/drupal/modules%21field%21field.api.php/functio...)
Any help?
Comment #22
cafuego commentedOkay then! I've taken @markus_petrux up on his offer of co-maintainership.
I created a 7.x-1.x branch in git and started by applying the patch from #9 and manually fixing that up, as it expects to be applied to the 6.x-2.4 release and not the VCS checkout.
The branch does not yet contain a working module. I have the PHP code to the point of showing and storing checkall settings on the field edit form and adding the checkall classes on the entity edit form.
The javascript parts don't work yet (patches welcome! ;-)
Comment #23
warmth commentedGreat news, keep going! :)
Comment #24
john franklin commentedAny progress on the D7 port?
Comment #25
btmash commentedI worked on this and the jquery components should be working now. Couple this patch with the code from #2142011: Fix version requirement (module requires >=7.8 core, even if installed is 7.23) and it should all work.
Comment #26
guypaddock commentedAttached is a better patch against the latest dev (from Jan 2013) that addresses other areas of concern that were causing this not to work in D7.
Namely:
$elementand$elementsparameters pass-by-reference incheckall_form_after_build()andcheckall_element_process(). This is not correct -- the functions need to return the element, not modify it in-place.$elements['#entity']->typeto$elements['#entity_type']incheckall_form_after_build(), but both are present in the element. This very same check was also throwing notices on forms like the Modules page because not all controls specify an element type (the default ismarkup).[#attributes][class]is an array, not a string.[#attached]rather thandrupal_add_js()anddrupal_add_css().once()function instead of custom CSS tags to ensure JS attachment is not repeated multiple times on AJAX responses.click()instead of directly manipulating thecheckedstate.Comment #27
joachim commentedUpdate to the last patch with one small but critical fix:
Without it, it won't enable!
Working fine for me.
Comment #28
frobTested the patch against the latest dev and I cannot turn off the checkall option after I turn it on.
Comment #29
frobThat took a bit. It also didn't work with users, and I needed it to. So now it works on more than just nodes.
I am moving the priority up to major, because the module just doesn't work at all on D7 as it is.
Comment #30
frobI need to unassign myself.
Comment #31
schifazl commentedHello,
I tried #29 without success, the patch didn't even apply, I had to apply a chunk manually. After enabling the module and adding the #checkall property, nothing happens.
Comment #32
schifazl commentedNever mind, I've found the setting in the field's edit page, I thought that I had to use the form_alter method. But still the patch needs to be applied manually by copy-paste. Anyway good work!
Comment #33
jweirather commented+1 for RTBC. Downloaded most recent dev version and patch applied cleanly. Configured field as noted (enabled checkall on field instance settings), and the options worked.
If I may recommend to either roll this patch, or add a note/reference to this thread from the main project page.
And thanks for this module!
Comment #34
frobI am marking this as a needs work and needs tests.
This project is supposed to work on the form api level and on the field formatter level. It sounds like we still need to get this to work on the form api level. Some tests might be a good thing moving forward to make sure that this is working on those two levels.
Comment #35
niallmurphy-ie commentedAfter manually applying the patch in #29, the module was working fine but throwing an undefined index: type on line 161 of checkall.module
Before:
Removing the line and thus the error..
What does this line do? I've no idea if it's terrible to leave it deleted...
Comment #36
guypaddock commentedThe line is checking to make sure that it's only applying to
checkboxchildren of acheckboxesform element. (See: https://api.drupal.org/api/drupal/developer%21topics%21forms_api_referen...). Not sure why someone would put other things under a checkboxes element, because they're not likely to be rendered, but it could still happen.Curious that it would not be set -- the default behavior is usually to convert a
checkboxesform element to being a container withcheckboxelements inside. Perhapscheckallis getting invoked too early in the form processing?Comment #37
niallmurphy-ie commentedI can't reproduce the error on a clean install so if it's ok to leave it omitted, I'll do that.
I have it working with an entity reference field in an entityform that uses an entity reference view to provide values. I guess something in that muddle is causing the error.
Comment #38
john franklin commentedCan we cut what is here as a 7.x-1.0-alpha1 release and start tracking the bugs individually? It sounds like it works for some use cases.
I'm willing to become a co-maintainer if doing so will speed up the release.
Comment #39
cafuego commented@JohnFranklin: Careful what you wish for. No going back now.
Comment #40
john franklin commentedThe 7.x-1.0 is out.