Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3799 closed bug (fixed)

"Read More..." functionality appears to be broken

Reported by: mmadia Owned by: haiku-web
Priority: normal Milestone: R1
Component: Website/CMS Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Pretty much since the upgrade to Drupal 5, it seems <!--break--> no longer functions as it used to.

It still cuts the article off as expected. However the fancy "icon"Read More ... link does not appear.

"Haiku at SCaLE 2009: the Report" is the last front page article where <!--break--> functions as expected.

Change History (7)

comment:1 by mmadia, 15 years ago

Summary: Ream"Read More..." functionality appears to be broken

comment:2 by koki, 15 years ago

This may be a problem with the port of Shijin to Drupal 5. Can you please provide the URL of specific node where the break tag is included but not working?

comment:3 by umccullough, 15 years ago

It seems to only work for blog posts now.

For example, at the bottom of the front page is the "Haiku Finally Gets a Native GCC4 - full story inside!" story, which does have the <!--BREAK--> tag, but doesn't show the "read more" link now either (it did before the upgrade).

I had mentioned this to Niels shortly after the upgrade, but neglected to put a ticket into Trac at the time :)

comment:4 by koki, 15 years ago

Fixed by adding...

<?php
if (strlen($field_cckteaser[0]['value']) < strlen($field_body[0]['value']))
{ ?>
<span class="read-more"><?php print l('Read more...', 'node/'.$nid, array('title' => 'Read the rest of this news post')); ?></span>
<?php } ?>

...to the News Post content type template (administer » Content management » Templates).

Seems to be working, so I guess it is OK to close this ticket.

comment:5 by mmadia, 15 years ago

Resolution: fixed
Status: newclosed

Thanks Koki!

comment:6 by umccullough, 15 years ago

Definitely looks better :)

Only one minor complaint though - it also shows the "Read more" when there isn't any more (no BREAK).

For example, see the "Haiku presence at Chemnitzer Linux-Tage" article.

Perhaps this isn't a big deal, but I think it didn't do this on the old site.

in reply to:  6 comment:7 by koki, 15 years ago

Replying to umccullough:

Only one minor complaint though - it also shows the "Read more" when there isn't any more (no BREAK).

Yes, I noticed that, but I don't know what the cause is yet. If I ever figure it out, I will fix it. :)

The dissapearing link seems to be related to the use on CCK based custom content types: it works out of the box with the built-in content types (blog, page, etc.), but not with the custom content types. This is vaguely documented in the Drupal website, and that's where I got the fix from.

The problem is that the D5 Shijin theme we are using has got quite messy; for example, it still has D4-related stuff in template.php which are unnecessary in D5; it also seems to be mixing the use of the Comtemplate module and tpl.php files for templating custom content types. This is all making the whole thing unnecessarily complex.

What the website needs is a new D5 theme that is well supported so that there is an upgrade path to when moving to D6. :)

Note: See TracTickets for help on using tickets.