sorry to submit one issue for multiple bugs but the changes are so minor...

1) changed db_fetch_object to db_fetch_array in nodereferrer_referrers because cck functions seemed to expect arrays rather than objects for formatting items.

2) content_pathauto.inc depends on a reasonable form to be setup in widget($op='form'). it complained when i tried to update nodes with the nodereferrer form. i've added a field_name[0]['value'] so content_pathauto is mollified.

3) cache_clear_all in nodereferrer_nodeapi did not have a table set and so would send malformed SQL errors

this patch fixes both. for drupal 5 and CCK 1.5.

this patch was built against a nodereferrer.module that had been patched with beginner's patch at http://drupal.org/node/107482 to update the module to drupal 5.

Comments

edrex’s picture

StatusFileSize
new2.88 KB

nothing controversial here except except I haven't tested hunk #3 with pathauto, but it doesn't seem to have any adverse effects.

Re-rolling to include #4 from http://drupal.org/node/107482 . Intending to merge all the "make it work with D5" tickets into a single patch here.

edrex’s picture

oops, left out part of the patch from 107482

edrex’s picture

StatusFileSize
new3.84 KB

and the patch..

edrex’s picture

StatusFileSize
new3.58 KB

The pathauto bit puts an artifact (the text "nodereferrer") on the node form, so here is a patch which leaves it off. Should be continued as a separate issue.

Also including the create cache fix from http://drupal.org/node/139283 for ease of patching.

edrex’s picture

StatusFileSize
new3.58 KB

fix typo "create" instead of "insert" for nodeapi op. i'm using nodereferrer extensively with this patch with no problems

dopry’s picture

Status: Needs review » Fixed

I strongly prefer each separate bug be its own patch and issue. It makes it much easier for me to review each change. I have put off reviewing this patch because it was going to take me an hour+, while each little patch would have taken me about 15mins each and I could have done the updates incrementally creating a more accurate change history.

In the future please do not merge issues like this, I will reject the patch.

That said. I really appreciate the work to get nodereferrer up to date. I've been busy with vacation :) and work. cvs version 1.5.

ps) regarding the path auto issue... It should probably be resolved in path auto. It may be expecting particular form structures which cannot be depended upon. There aren't really directions for reproducing the path auto issue, and see as nodereferrer isn't producing the error I'm unlikely to commit anything to nodereferrer to fix it.

Anonymous’s picture

Status: Fixed » Closed (fixed)