When using Read More Tweak together with excerpt.module, the default Read More... link is not removed; this is because ed_readmore runs first, unsets $node->readmore. Then excerpt's hook_nodeapi("view") runs and sets $node->readmore back on, after which the theme will output the "Read More" text.

The solution to this is to set the weight of the Read More Tweak module higher to have it invoked later. You can do this with the moduleweight module, but it makes more sense to do this by default. To do this, create an ed_readmore.install file with the content shown below. Can we get this added to the module?

If you're already using read More Tweak, do the following:
- disable the module
- uninstall the module
- enable the module

The uninstall step is necessary to remove the module's old entry with the default weight.

----file ed_readmore.install----
<?php
/* $Id: */

/*
* Implementation of hook_install
*
* Sets the module weight to make ed_readmore run later than most other modules. This
* prevents a conflict over the value of $node->readmore when used together with
* excerpt.module
*/
function ed_readmore_install() {
$ret = db_query("UPDATE {system} SET weight = 5 WHERE name = 'ed_readmore'");

if ($ret) {
drupal_set_message(t('Ed_readmore module installed succesfully.'));
} else {
drupal_set_message(t('Ed_readmore module installation was unsuccessfull. Could not update module weight in DB.', 'error'));
}
}

function ed_readmore_uninstall() {
// nothing here, just need to be able to uninstall and
// re-install the module
}

Comments

mcurry’s picture

I'll investigate and add this as soon as possible. Thanks for the heads up.

mcurry’s picture

Status: Active » Fixed

I've committed this change, it should be available in Drupal-5.x.1.3

mcurry’s picture

I'm adding this to the Drupal-6 branch as well.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.