Projects ⇒ Bugs ⇒ #418: getlink() links have Missing/corrupt Module Name ⇒ CPG Dragonfly™ CMS
Bug #418 getlink() links have Missing/corrupt Module Name
Project: Dragonfly 9.0.3 -> 9.3 Category: *CPG Core Issues
Submitted: Monday, April 11, 2005 (14:15:32) Modified: Wednesday, April 13, 2005 (07:30:08)
Status: Closed Assigned to:
PHP Version: 5.0.3 HTTPD Server: Apache 2.0
Votes: 1
Vote results:
Avg. Score: 5.0 ± 0.0 Reproduced: 1 of 1 (100.0%)
Same PHP Version: 0 (0.0%) Same HTTPD Server: 1 (100.0%)

View/Vote Add Comment

by: Jeruvy
Description:
------------
Fresh 9.0.3 install on windows XP Apache 2.0, PHP 5.0.3 and MySQL 4.1.7 (sorry haven't had time to update this yet)

From the admin page click on HOME in the top left and select "Contact Us" generates this error:

"We're sorry, but that page modules//index.php does not exist"


The debug array is as follows:

Array
(
[banned] =>
[theme] => cpgnuke
[session_time] => 1113250174
[session_start] => 1113247630
[admin] => Array
(
[page] => settings
)

[user] => Array
(
[page] =>
[file] =>
[uri] => /dragonflytest/admin.php?op=settings&s=10
)

[comments] => Array
(
[mode] =>
[order] => 0
[thold] => 0
)

)

In fact any link in HOME will cause this error.
by: Jeruvy
Fixed the summary to be more specific (I hope)
by: Jeruvy
Additionally CPGMM links and header links are also affected by this.

I don't think I did anything stupid in the installation...?
by: Jeruvy
Ok the bug seems to be with getlink()

The $module name is being returned as 'forums' when it should be 'Forums' as an example.

But why $module or $module_name is not getting the correct data I haven't determined yet...
by: Brennor
See Bug #402.

I experienced this during PostgreSQL integration. Couldn't find a better category, so I dumped it into CPG core issues.

I thought that MySQL would be ok with it, since it seems to work with most versions. Your version of MySQL must not be setup the same way as most other versions though, since your MySQL install exhibits the same behaviour as my Postgres install does.

Try this fix (specifically the bolded section of the line), since it might be the same problem. From your description of events, it sounds like the exact same problem I encountered:

Change line 59 of index.php to:

$module = $db->sql_ufetchrow('SELECT title, custom_title, active, view, blocks, version FROM '.$prefix."_modules WHERE LOWER(title)='$module_name'", SQL_ASSOC, __FILE__, __LINE__);
by: Jeruvy
Ok this fix posted by brennan does the trick, the links are back working again.
by: Brennor
Very interesting that a MySQL version also fails with the same symptoms that PostgreSQL did.

Did you turn on case sensitivity Jeruvy?

The problem is the db trying to match 'forums' to 'Forums' or 'surveys' to 'Surveys'. In most versions of MySQL this comparison seems to work. Yours is the first I've heard of where it didn't.
by: frank
It's not the first, mine is behaving this way as well. I'm going to try that fix.
User Info

Welcome Anonymous



(Register)
Community

Support for DragonflyCMS in a other languages:

Deutsch
Español