Problem with CCK content output on Drupal 5
rbl - January 29, 2007 - 19:38
| Project: | Footnotes |
| Version: | 6.x-1.x-dev |
| Component: | Footnotes.module |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
The problem is that the footnote is being added after the CCK field where the footnote is and not in the end of the entire content, making the footnote appear in the middle of the text.
Take a look at the screenshot.
| Attachment | Size |
|---|---|
| Picture8.png | 34.21 KB |

#1
This is by design.
There is little we can do without writing another module altogether: we depend on Drupal's core API and it only allows us to modify the text within one field.
CCK is accepting different input formats for each field. Some might have the footnote filter, some other not.
There is no way for us to know where to put the footnote.
If you can offer an elegant solution, and a patch, I'll review it.
#2
I would be satisfied if we could ensure the footnotes tag was respected =)
Moving the tag all over the page doesn't make any difference...
#3
You mean that if you put the footnote tag in one field, you get the actual footnote at the bottom of another field?
Can you precise?
#4
No, sorry! I meant that the tag is not doing a thing! I can place it anywhere and the footnote content will always be outputted after the field containing the x code.
#5
Either I don't understand what you mean,
or I understood properly in the first place, in which case it is as I said: by design.
#6
Let me try to explain it again because my tags were removed =)
Let's say I have a CCK content type with 3 textarea fields. They all have Filtered HTML as input format where the module was configured and is working fine.
Adding a footnote (fn) to TEXTAREA#2 makes the footnote block (div or ol) appear bellow it, between TEXTAREA#2 and TEXTAREA#3, ignoring completly the "place footnotes here" tag (footnote)
TEXTAREA#1
TEXTAREA#2 has <fn>x</fn>
<ol><li>1. x</li></ol>
TEXTAREA#3
<footnote />
Hope that's better =)
#7
To be honest, I don't have much time this week. I'll do my best to investigate after next week, but I think I perfectly understood what you meant, and I have already replied a few times.
The footnote can only be placed within the same textarea as the one containing the footnote tag. We cannot place the footnote at the end of another CCK field. I keep trying to explain that you cannot place the
<footnote />tag in another field than the one containing the actual footnotes. The<footnote />tag will only work within the same CCK field or textarea. The<footnote />tag in textarea#3 will only take into account the footnotes present in your third CCK textarea field. This is by design and we are limited by how the core Drupal API work. CCK is not part of core. Maybe you should ask the CCK developers to provide an API that we could use, that would do what you request.If you provide a patch, I will consider it. See my comment #8 here: http://drupal.org/node/101126#comment-185909 .
#8
Hi rbl and others
I'd like to point out that when Beginner says "this is by design" it's more like this is a consequence of Drupal's and CCK's design, not that anyone did this on purpose when developing Footnotes :-)
So, as Beginner is trying to explain, Footnotes is a filter module, and when you use CCK, filters are run independently on each field (part) of your CCK page. Footnotes has no way of knowing that what text it is seeing is actually a small part of some bigger context. So the footnote is put at the end of the portion of text (one cck field) that was fed to the Footnote filter.
I have not used CCK myself together with Footnotes, so never ran into this problem. But since most filters seem to just substitute some string/code to some other string - a very local operation - Footnotes may well be the first to have this kind of problem: We would need to somehow know all of the page, where it starts and ends and which fields belong to it.
I do agree with rbl that this is a problem, for instance one could easily create a CCK page with a lot of footnotes all numbered "1". But as it is now, it is not trivial to fix from within Footnotes only.
So I will put the status of this bug back to active, but please everyone understand that neither me nor Beginner nor anyone else have currently committed to fix these kinds of issues.
#9
#10