1
Peekay
arMS most popular SQL errors. [Fixed]
  • 2005/4/3 23:25

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I was having such a good day with arMS... until I clicked the 'most popular' link in the menubar. Just got a white page and the message:

Quote:

SQL error:
SELECT can_edit_pages, can_add_pages, can_delete_pages FROM xoops_arms_permissions WHERE art_id = 4 AND uid =

Same problem with 'newest' and 'top-rated' too. The list of articles is displayed perfectly if I am logged in as an arMS section moderator, or as a user with permissions to edit articles. This only happens when I log in as any other user.

I tried the SQL debug, but it only works when you are logged in as admin - and I don't get a problem then. So I tried the PHP debug and I get the additional error:

Quote:
Notice [PHP]: Undefined variable: uid in file modules/arms/filter.php line 53

So I read the 'readme' and was sad to discover that the developer mentions this is a known bug.

So.. I just wondered if anyone with PHP skills had already fixed this, or if they might recognise the error and give me a clue where the problem might be?

Same issue with XOOPS 2.0.7.3 and beta 3.

2
Peekay
Re: arMS most popular SQL errors. [Fixed]
  • 2005/4/4 2:06

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


So I hit it with a spade.

filter.php line 49 or thereabouts, replace:

$arms_display[$counter]['uid'] = $row['uid'];

with

$uid ;

The file appears to be looking for a user ID that only exists if the user is in the arMS records as an author or moderator, which of course most users are not. So I just gave it what it wanted.

Should really write a conditional statement, but it's late.

Login

Who's Online

324 user(s) are online (216 user(s) are browsing Support Forums)


Members: 0


Guests: 324


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits