Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
Panels Integration
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
26 Mar 2009 at 09:40 UTC
Updated:
3 Jun 2010 at 23:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
karens commentedSince the Panels project page plainly says that Panels 2 will not be supported or recommended, CCK will support Panels 3, but only when someone writes a patch :) There is already an issue somewhere about this.
Comment #2
yched commentedBoth Karen and I have absolutely no time to maintain Panels integration. Michelle is providing patches when she needs then for Advanced Profile.
I reiterate my call for a 'Panels / CCK integration' maintainer :-) : #329464: Maintainer needed for CCK / Panels integration
Comment #3
yched commentedCrosspost :-)
Comment #4
thomasmuirhead commentedThank you for your replies.
I was thinking of reposting your call onto the Panels issue queue too, as Panels without CCK compatibility would be a concern to many Panels fans who might have the nous to maintain the integration which I am still unfortunately lacking.
Is it ok under drupal etiquette to post a call for maintainers in a different modules issue queue?
Comment #5
yched commentedWell, the panels maintainers are aware of this, and adding this to their queue would be polluting. I did however add a post on the 'CCK' and 'Panels' groups on groups.drupal.org back then.
Comment #6
thomasmuirhead commentedok thanks.
Hopefully someone will step in. I wish I could.
Comment #7
michelleSorry, I couldn't find the Panels 3 issue this duplicates. The other issues were about Panels 2.
Here's the files to make it work in Panels 3. They're working for me but could use others to test.
Michelle
Comment #8
michelle(Changed title so it makes more sense when seen outside this issue queue)
Another related issue. Currently we have this:
content.module:
fieldgroup.module:
While that code works, it is the old way of doing it and needs to be removed and replaced with:
Then you need to make a "content-types" directory both at the root and in the fieldgroup module directory and move the include files in there. "content-types" can be changed if you don't like that as a name. I just needed to pick one for testing.
Michelle
Comment #9
yched commentedFor the record, we agreed with Michelle and Merlinofchaos to wait until Panels 3 reaches beta state and officially deprecates Panels 2 before we commit this. Meanwhile, early Panels 3 adopters can use (and test, I guess ?) the patch above.
Comment #10
robloachThis issue is my favorite issue of the week.
Comment #11
thomasmuirhead commentedThank you so much for this Michelle...makes Panels 3 a reality. I second Rob's favouritism
If anyone is wondering what to do with the two .inc files that Michelle has created above (only because I stared at them wide-eyed for a while).
Overwrite the old fieldgroups.panels.inc file with the one attached above (remember to remove the .txt) at /sites/all/modules/cck/modules/fieldgroups/
then do the same with the content.panels.inc at sites/all/modules/cck/includes/
NB: I wasn't sure whether to try the related issue stuff in #8 so I haven't...and the above files still work great.
Thanks again
Comment #12
michelleJust an FYI: Earl checked in code last night that changes a lot of this. I should have new files posted later tonight or tomorrow.
Michelle
Comment #13
niklp commented[Arbitrary subscription message here]
Comment #14
michelleSorry for the delay, folks. Had a rough weekend and plus I promised Earl I'd document what I learned about making content types. I have camera club tonight and promised a client I'd do some work for him tomorrow night. If I don't manage to squeeze it in during the day, it will be a few days, yet.
Michelle
Comment #15
michelleOk, here's fieldgroups. I still need to do fields but out of time for the moment. The attached file needs to go in cck/modules/fieldgroup/plugins/content_types and have the extension fixed ( I really wish .inc was an allowed one.) The old file needs to be removed. This also requires the following changes to fieldgroup.module:
I don't expect this to be committed in this state but want to keep getting the work out there as I do it. Once it's all ready, I'll try my hand at making a proper patch. Will do fields ASAP, probably this evening.
Michelle
Comment #16
michelleOk, here are new files for fields and fieldgroups. I had to change the CT name of fieldgroups to content_fieldgroup because that's what it was named in P2 and Earl said that will make upgrading easier, even though it was badly named to begin with. content.module needs the same changes as fieldgroup.module did above. I'll do a better job of writing this all up later. I'm out of time and want to be sure what I've done is in the issue at least.
Michelle
Comment #17
michelleDon't get too excited... Just found out from Earl that I've had a design flaw in this since the start back in D5. So there's going to be more changes coming. Though this does work it just doesn't do things the "proper" way.
Michelle
Comment #18
michelleOk, here is a better description of what is changing, with the exception of the contents of the two .inc files since those can just be dropped into place.
This is what needs to be done to the files:
- cck/includes/content.panels.inc
+ cck/plugins/content_field.inc
- cck/modules/fieldgroup/fieldgroup.panels.inc
+ cck/modules/fieldgroup/plugins/content_fieldgroup.inc
And then the module code:
content.module
fieldgroup.module
We're still discussing what's going in the .inc files. :)
Michelle
Comment #19
michelleOk, here's the updated fieldgroups file. Fields coming. :)
Michelle
Comment #20
michelleOk, here's fields as well as a slightly changed fieldgroups. Don't forget all the changes from #18 as well.
Still to do:
* Create icons for fields / fieldgroups or decide to use the default
* Verify that "Content" is the category we want to use. I advise against placing them in node where they used to be because of the sheer number of them now.
* Test, test, test! The site I'm developing this on is actually one that's on its way to becoming something else because I haven't had time to set up a proper dev site, yet. So it only has one content type with fields on it and is not a good test. I'll try to get something better set up but it would be good if others could help out with testing this to find all the edge cases.
Michelle
Comment #21
robloachHere's a patch off of what Michelle provided. I couldn't get the fields to list in the Panel content area.... Hmmmm.
Comment #22
michelleYou got the fieldgroups to show up and not the fields?
I can't see what you're missing just from skimming the patch. Will have to try it out and see if I get some time later tonight.
Michelle
Comment #23
michelleOk, I tried to do a comprehensive patch but doing a patch with directory changes is complex. So here's a patch for the changes to the .module files. In addition to this patch, you need to do this with the files in #20:
- cck/includes/content.panels.inc
+ cck/plugins/content_field.inc
- cck/modules/fieldgroup/fieldgroup.panels.inc
+ cck/modules/fieldgroup/plugins/content_fieldgroup.inc
Michelle
Comment #24
michelleOh, PS, I confirmed that this does work for both fields and fieldgroups on a fresh checkout of CCK 6.x-2.x. The "needs work" in the status is because of the first 2 items in #20. Mostly it needs review.
Michelle
Comment #25
niklp commentedI asked you before, and you said you'd patched against 2.2. Can you confirm which version you're patching against? IMO, it would be sensible to patch against a non-dev version, as that is at least static and not date-dependent. I am taking "6.x-2.x" to mean "6.x-2.x-dev" as that's the simplest inference. We need to be clear which is which.
What are the likely changes going to be, and are they short term, or long term things that we have to wait for?
Thanks.
Comment #26
michelleNikLP - Well, I assumed you meant the latest code in the 2.x branch. No, you don't patch against old code. That makes no sense. You need to make the patch against the code it will be committed to.
What changes are you talking about?
Michelle
Comment #27
niklp commentedThe changes you mentioned in #17.
On IRC you mentioned that CCK isn't getting much attention right now (i.e. it's not fast moving) which is fine. But what's wrong with patching against 2.2? If you patch against dev, no-one will get the patch to work because they won't know which one to patch. 2.x-dev could be from any day.
Just exercising the logic. I'm not going to argue it further because we won't get anywhere. I'll let it go because I'm sure it's a protocol thing.
Comment #28
michelleI've already made the changes in #17. That's why I posted new files.
I don't know what you mean about "which one" to patch. You patch against the latest in cvs. If it no longer applies, that means I need to reroll it. Odds are that won't be a problem because CCK isn't changing that much anymore but it's still something that needs to be known. If I create a patch against old code and something changes in CCK, it will fail when yched goes to commit it. So your logic is flawed.
Michelle
Comment #29
karens commentedI need to do some testing of Panels with some of my modules, so I'll test this patch while I'm at it and commit it if I can. I hope to get to this in the next day or two.
Comment #30
michelleAwesome, thanks Karen!
Michelle
Comment #31
robloachStill can't get it. I applied the patch at #23, switched the files from #20, created this patch.
Tried with CCK's DRUPAL-6--2, and Panels 3's DRUPAL-6--3 with a text field applied to my "Story" content type with "Something" as the label. When Panels 3 DRUPAL-6--3 failed, I tried it with DRUPAL-6--3-ALPHA4, and still no go. I'm look at the add content screen of the Panels page, and the attached screenshot is what I see.....
Comment #32
michelleRob: I can see the problem right in your screenshot: you're not using the latest CTools / Panels 3 code. That isn't even close to what the add content dialog looks lke now.
Michelle
Comment #33
michelleFor reference, here is a screenshot of the add content dialog with the uprofile fields/fieldgroups from APK.
Michelle
Comment #34
mrjavum commentedSome fixes in paths:
the right are:
cck/plugins/content_types/content_field.inc
cck/modules/fieldgroup/plugins/content_types/content_fieldgroup.inc
Comment #35
karens commentedI'm still working through this, haven't got it working yet. For future reference, here's what you need to do to get started with this patch:
- Use Panels DRUPAL-6--3
- Use CaosTools HEAD (with today's changes, Earl just committed some things while I was working with him)
- Run update.php
- Rebuild the menu and clear caches.
- Create a panel and give it a 'Node' context.
Then try to add fields.
However I still can't get the patch working. Michelle provided an example of what should show up - http://drupal.org/files/issues/add-content.jpg.
Because of all the confusion of patches above, I'm going to commit what I have and give Michelle (the only person who has a functioning setup) a chance to post an incremental patch for whatever I'm missing.
Comment #36
mrjavum commentedwith fixes in paths in #34 I have functioning setup too :)
Comment #37
michelle@mrjavum: Thanks so much. Serious headdesk moment there. I could have sworn I copied the paths straigh out of WinSCP. I have no clue how I managed to lose the critical directory there.
Michelle
Comment #38
karens commentedI missed #34 at first, but that led to a long conversation in IRC between me and Earl and Michelle about how to locate and name these files for consistency with the way we did Views and the needs of the Panels module, and we ended up moving them so that the panels include file is at includes/panels/content_types/... and the fieldgroup one at modules/fieldgroup/panels/content_types/...
I questioned the need for the extra directory level when there is only one file there, but it seems it is the best way to do it.
So that is committed and ready for testing.
There is no patch to apply now, I'm just marking this to get attention for testing and review.
Comment #39
niklp commentedJust to confirm, Karen - you've committed the basic patches to CCK dev now and we can wait for the package script to run to get a complete one?
Comment #40
michelleNikLP - Yes, or get it right out of cvs.
Michelle
Comment #41
merlinofchaos commentedThis patch fixes things, plus implements icons. Note that the icons are not yet included so right now everything gets a default icon (which happens when the proposed icon does not exist). I'm having yoroy whip up some icons for this purpose.
Sorry about the EOL trimming in the patch, my editor is set to do that automatically.
Comment #42
karens commentedOK, finally!! I have committed that final patch and am able to get fields into panels. Yay! Thanks to Michelle and Earl.
To reiterate:
- Use DRUPAL-6--3 of Panels, HEAD of ChaosTools.
- Rebuild the menu and clear your caches to make sure nothing from previous versions is in the way.
- Remember that Panels support questions go on the Panels issue queue, we won't be able to help with those :)
Comment #43
robloachGreat work, all! This is quite amazing..... Was getting a warning. Should it be
$conf['formatter'], instead of$conf['field_formatter']. Here's a patch!Comment #44
michelleRob: good catch. I made sure I could choose the different formatters but never looked to see how they changed on output. This is why I wanted other people testing. ;)
Thanks,
Michelle
Comment #45
michelleSorry, folks, I ended up falling asleep while getting my son to sleep and lost the whole evening. I will test this tomorrow. Really could use other people testing it as well since it's hard to thoroughly test your own code. :)
Michelle
Comment #46
karens commentedOK, I committed that fix and updated CHANGELOG.txt. Anyone interested could also create some documentation on how to use this in the d.o. handbook or as a patch for inclusion in the Advanced help docs.
Comment #47
karens commentedWell maybe I should leave this at 'Needs review' to stimulate more testing, but it is at least functional.
Again, no patch to apply, all the code is committed, it just needs testing.
Comment #48
michelleOk, giving this a test from the latest CCK cvs. I noticed that Earl's fix to make nice node type names on the fields didn't make it to the fieldgroups. Will add a patch if no one beats me to it but I'm just about done for the night.
Michelle
Comment #49
michelleAlso noticed the admin title on the fieldgroups are missing the fieldgroup name.
Michelle
Comment #50
WorldFallz commentedSpent some time testing this out with cck dev, panels & ctools beta1-- works great so far. I'm still trying to wrap my head around all the capabilities of this new trifecta of modules but it's truly amazing stuff.
Comment #51
mcloki commentedI seem to be getting this error popping up alot after activating panels beta and ctools beta.
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ,..............public_html/modules/ctools/includes/context.inc on line 163
After I activate agrigrator for ctools, my theme goes completly bonkers. Images aren't where they should be ect...
Comment #52
michelle@mcloki: #450420: Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ctools/includes/context.inc
Please keep this issue on topic with the CCK/CTools integration. Other issues belong in the queue of the problem module.
Michelle
Comment #53
qbnflaco commentedComment #54
qbnflaco commentedThis is a ctools issue I also came across... #457254: Warning: Unexpected character in input: '\' \ctools\includes\context.inc on line 163
Comment #55
michelle@qbnflaco: Please, I just asked the poster before you to keep this issue on topic. This is not a dumping ground for misc panels issues.
Michelle
Comment #56
michelleFrom http://drupal.org/node/430220#comment-1567254 by WorldFallz:
That means the restriction code isn't working. That was one of the things I haven't been able to test, yet. Will try to get that working soon.
Michelle
Comment #57
merlinofchaos commentedI think this actually means that the relationship, provided by content_profile, is not placing any restrictions.
Comment #58
merlinofchaos commentedBTW, the more I use this, the more I feel that the fields should be categorized under 'Node' rather than 'Content' so they can join all the other node related fields. The way they are organized we can put a lot more there than we can in, say, Views, and still get away with it.
Comment #59
WorldFallz commentedmerlin in #58:
I tend to agree-- when I first tried this out (i jumped into p3 at beta1 w/o any prior exposure to it) I didn't even notice the content tab at first-- I clicked immediately on the node tab and expected to see all node items there. Took me a bit of fumfering around to notice the content tab (of course that could just mean i'm dull-witted, lol, since that's the way views fields are organized).
Comment #60
michelle@#57: Hmm... I thought the restriction by type was in the content type, not the relationship? Haven't had a chance to dig into it yet.
@#58: I'm fine with putting it in node. I just didn't know if putting potentially hundreds of new items in there would drown out what's already there. Whatever you folks think is best is fine by me, though. As long as it works, I'm not fussed on where it goes. :)
Michelle
Comment #61
merlinofchaos commentedIt has to go on both sides:
The content type says "I am only applicable to these types of nodes".
The context says "I can be one of these types of nodes."
Almost certainly the relationship is just saying "I am a node", which means type is unknown, so the restrictions do not apply.
Comment #62
michelle@merlinofchaos: Oooooh, yeah, then that's definitely it. I'll make a note on the relationship issue, then. Thanks!
Michelle
Comment #63
qbnflaco commentedI updated the the latest cck dev and haven't ran into any issues with it so far. Great work guys and gals!
Comment #64
z33k3r commentedAm I lost, or is there no way to use a CCK field as a context for passing to a view?
Comment #65
michelle@z33k3r: Well lost in the fact that you're in the wrong issue for that... Please start a new issue for your question. :)
Michelle
Comment #66
cardell commentedI tried to get the fields/fieldgroups working, but couldn't seem to make it work.
I tried using CCK 6.x-2.3 and 2.x-dev. I have Panels 6.x-3.0-beta2 and CTools 6.x-1.0-beta3. The release notes for CCK 2.3 say that this was included, so I didn't apply any of the patches or file changes in the posting.
It lets me add a CCK field, but nothing appears. I also tried adding a fieldgroup...after I select the fieldgroup and click finish, I get sent to a page with just this:
If it helps, in the add content modal, the icon for the fieldgroup doesn't show up.
Maybe there's something on the panel creation that I'm missing. I added a panel, gave it a Node Required Context. On the content side, I added view of my content type in one pane and in a side pane added a nodereference field from the content type of the node pulled by the view in the main content. Am I doing something wrong in this setup?
Thanks...
Comment #67
Daniel A. Beilinson commentedHello!
I can't get fields/fieldgroups' edit&add forms in panels. Only base form.
Any plans to integrate cck's add and edit forms for fields and fieldgroups?
Comment #68
michelle@La_ntegral: I have no plans to do that at this time. I won't rule it out for the future, but certainly not the near future.
Michelle
Comment #69
Daniel A. Beilinson commentedOkay, I can use editable fields at near future! :-)
Thank you, Michelle.
Comment #70
markus_petrux commented@Michelle: may I suggest turning this issue to fixed state and start new issues for specific problems, features?
It's hard to follow what's missing, and since CCK has a "Panels Integration" component for the issues queue, it seems it make things easier.
Comment #71
michelle@markus_petrux: Fine by me. I think the only thing that's missing is restricting what field/fieldgroups are shown in add content by what node type we have context for. But it's been a while since I've looked at it so there may be something else I'm forgetting.
Michelle
Comment #72
markus_petrux commentedSweet, so I'm marking this issue as fixed. Since Panels 3 integration is already present since cck 6.x-2.3 release, then I think many peope will be testing it already, which is the concern KarenS used to keep this issue for review.
Here's a separate issue about field privacy checking. I attached a patch for review:
- #361473: CCK fieldgroup panels doesn't respect CCK field privacy settings
Comment #73
markus_petrux commentedPlease, let me re-open this issue again.
It seems to me we have a file in fieldgroup module that is not needed anymore:
-
modules/fieldgroup/fieldgroup.panels.incThe fieldgroup content types are now implemented in:
-
modules/fieldgroup/panels/content_types/content_fieldgroup.inc@Michelle: Could you please confirm in the file
fieldgroup.panels.inccan be removed from the repo?Comment #74
michelleYes, see http://drupal.org/node/414298#comment-1529662
Michelle
Comment #75
markus_petrux commentedWow, thanks for the quick response!
And also thanks for your articles about Panels 3. That helped me a lot to figure out quickly how it all works. :)
File
fieldgroup.panels.incremoved from CCK2 and CCK3 repositories.Comment #76
michelleNo problem. Thanks for finishing this integration up. I sort of left everything hanging when I switched focus to Advanced Forum.
Michelle
Comment #77
jmather commentedI was curious if someone could summarize what versions of CCK/Panels/Ctools (Whether it is dev or not) are necessary to get the fields to show up as shown in the screenshot http://drupal.org/files/issues/add-content.jpg
I understand it is pretty bleeding edge, but I'm curious to try it out.
Comment #78
michellejmather: I'd recommend using latest dev of all of them. There's so many changes going on, best to stay on the bleeding edge to test things out.
Michelle
Comment #79
jmather commentedGot it, merlin clued me in...didn't realize I had to set a node context. Thx.
Comment #80
lord_of_freaks commentedsuscribing