I had the article module working fine until my web host just upgraded to PHP 4.4.1

Now the listing of categories repeats the first category term for the amount of terms in the vocabulary.

It looks like this:
Associations (2)
Associations (2)
Associations (2)
Associations (2)
Associations (2)
Associations (2)

When it should like this:
Associations (2)
Education and Training (1)
Engineering (0)
Magazines (4)
Manufacturers (8)
Suppliers (11)

I run PHP 4.4.0 locally and it works fine and I can change my web host to PHP 5.0.4 and it works fine. From what I can tell the next() funtion in article_build_index is not advancing the array pointer.

CommentFileSizeAuthor
#5 article.module.patch1.08 KBpuregin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Timotheos’s picture

somes’s picture

http://drupal.org/node/38328

This might fix/break something else

mjohnson16’s picture

Changing line 228 from:

$cur = current($tree);

to this:

$cur = current(& $tree);

Worked for me. I'm not very good with PHP so perhaps someone else can verify this.

alexandreracine’s picture

Priority: Critical » Normal

Look here for this bug work around.
http://drupal.org/node/38328#comment-76663

puregin’s picture

Status: Active » Needs review
FileSize
1.08 KB

Here's a patch based on the information given in the preceding posts.

I've not tested this because I don't have a PHP 4 installation, nor an active 4.6 install.

Djun

ryivhnn’s picture

None of the above worked for me :( Tried changing lines, tried patching (on two separate copies of the file in question), both of them end up with

warning: call_user_func_array(): First argumented is expected to be a valid callback, 'article_page' was given in /home/altbaby/public_html/new/includes/menu.inc on line 354.

I also found out I can't actually edit the file at all, when I initially just changed line 228 and then changed it back to what it was originally, it didn't do anything. I can resolve that particular error by reuploading the original article.module (yay for backups) but that kind of doesn't fix the loop problem :)

msameer’s picture

Version: 4.6.x-1.x-dev » 4.7.x-1.2
Assigned: Unassigned » msameer

Are you still experiencing this ?

Timotheos’s picture

Nope ... well actually my host has upgraded to 4.4.4 and I'm running the 4.7 version.

msameer’s picture

Status: Needs review » Fixed

Thanks for the info.

I'll close this bug then.

Anonymous’s picture

Status: Fixed » Closed (fixed)