Posted by rimu on August 19, 2008 at 2:38am
6 followers
| Project: | Read More Link (Drupal 6 and earlier) |
| Version: | 6.x-5.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Todd Nienkerk |
| Status: | closed (duplicate) |
Issue Summary
When a node has some CCK fields and they get shown in the teaser for that node, the CCK fields always appear below the 'read more' link. Have a look at an event on http://tt.org.nz for an example
<div class="content"><div class="event-nodeapi">
<div title="2008-10-05T06:30:00Z" class="event-start dtstart"><label>Start: </label>5 Oct 2008 - 7:30pm</div></div>
<p><b>Money as Debt</b> Paul Grignon's 47-minute animated presentation of "Money as Debt" tells in very simple graphic terms what money is and how it is created. Money has become the drug of our societies. Confronted with this phenomenon, citizens all over the world are inventing complementary currencies for social ends and are opening the debate: What is money for?</p>
<span class="read-more"><a href="/node/686"><strong>» Read more</strong></a></span><div class="field field-type-text field-field-venue">
<div class="field-label">Location / Venue: </div>
<div class="field-items">
<div class="field-item">
Earthsong Eco-Neighbourhood Common House, 457 Swanson Rd Ranui </div>
</div>
</div>
</div>
Comments
#1
Oh I should add that changing the
$marker_to_insert_at = "</p>";line to$marker_to_insert_at = "</div>";didn't help. I get the impression that CCK might be adding it's fields in AFTER this module is.#2
I realize that this may seem strange, but I consider CCK compatibility (or indeed, compatibility with any non-core module) to be a feature request, not a bug. (Last time I checked, CCK was not part of core... or have I missed something?)
If someone can submit a patch that will allow reliable CCK compatibilty, by all means, please submit the patch. I doubt I'll have time to work on this anytime soon.
#3
You could try adjusting the modules' relative weights in the system table - make ed_readmore 'heaviery' than CCK and the CCK field modules... (this all seems so familiar -- I think that there have been issues filed against ed_readmore in the past, and the system table weights may be a way to fix this.)
#4
See issue #266432: Patch to fix conflict with excerpt.module (and possibly others)
Also:
http://drupal.org/project/moduleweight
http://drupal.org/node/110238
#5
I'd also think that CCK Compatibility would be a most important feature. Using cck text fields for all my drupal site's teasers ...
Is this feature actually beeing considered for future versions of Read More Tweak?
#6
For reference, the following issues are duplicates of this one:
#7
The solutions outlined in the following bugs have fixed this problem:
I will commit the code shortly.
#8
#9
Automatically closed -- issue fixed for 2 weeks with no activity.
#10
I am re-opening this issue as I believe that the expected behaviour could be open to discussion. I also have a teaser listing of events, where the event content type consists of a tilte, a body text and cck fields for venue and dates. However, I do expect to have the Read more link displayed inline with the teaser field, before the actual cck fields, when I select the inline option, even if I have chosen to display those cck fields in my teaser displays.
#11
kdebaas: Can you verify that the behavior you describe in #10 does not occur as desired in the 6.x-5.0-RC1 release? The 5.0-RC1 release is a bit newer than 3.x-dev, which is itself completely different than 3.0.
#12
Yes, the described behaviour occurs in the 6.x-5.0-RC1 release, which I started using since I liked very much the move from hook_nodeapi to template_preprocess_node.
I saw in your code that
<?phped_readmore_link_place()
?>
<?php$variables['content']
?>
<?php$variables['content'] = ed_readmore_link_place($variables['content'], $variables['node'], $display);
?>
I had thought that the CCK fields could be circumvented by working instead on
<?php$variables['node']->teaser
?>
#13
Attached patch inserts the read more link inline with the teaser field, above cck fields that are set to display below the teaser.
Choosing the option 'after' for placement of the read more link places it at the end of the teaser, below the cck fields.
#14
kdebaas: I've been trying to replicate this behavior, but so far, the Read More link reliably appears before any CCK fields added to the teaser. (I'm using CCK 6.x-2.5.) It seems the behavior you want is already built into the module. Just for kicks, I compared your
$insert_pointvalue with$match[0][1]and found they were the same each time.Would you mind checking the latest 6.x-5.x-dev snapshot and let me know exactly how I can replicate an instance in which the Read More link appears after any CCK fields?
#15
I'm pretty sure this has been fixed here:#629990: Read More link not inserted properly when CCK fields are displayed before node body. Marking as a duplicate.