BUGS using with postnuke BUGS using with postnuke
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

BUGS using with postnuke

Started by eolica, November 30, 2003, 01:00:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

eolica

When using RC4 under postnuke I get the following "error" on top of each and every coppermine screen:

Warning: Cannot add header information - headers already sent by (output started at c:\phpdev5\www\public\726\header.php:117) in c:\phpdev5\www\public\726\modules\Coppermine\include\functions.inc.php on line 56
Sesto Avolio

eolica

and also:

Warning: Cannot add header information - headers already sent by (output started at c:\phpdev5\www\public\726\header.php:117) in c:\phpdev5\www\public\726\modules\Coppermine\db_input.php on line 304

after adding new picture
Sesto Avolio

DJMaze

did you upload all files ?

because Warning: Cannot add header information - headers already sent by (output started at c:\phpdev5\www\public\726\header.php:117) in c:\phpdev5\www\public\726\modules\Coppermine\include\functions.inc.php on line 56 are solved.

load.inc.php should say this at the end:    require($CPG_M_DIR . '/include/init.inc.php');
    if (defined('IN_POSTNUKE') && !defined('NO_HEADER')) require("header.php");
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

eolica

Quote from: "DJMaze"did you upload all files ?

load.inc.php should say this at the end:    require($CPG_M_DIR . '/include/init.inc.php');
    if (defined('IN_POSTNUKE') && !defined('NO_HEADER')) require("header.php");

Yes, it is this way.
For your info: the warning doesn't appear with postnuke .726 when user is not logged in; it appears with pn .714 in any case  :?:
Yes, I cleared all the cookies :!:
Sesto Avolio

DJMaze

ehm you didn't told me that.

I developed using postnuke .726

Why still use the Rogue_714 of postnuke ?
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

eolica

A couple of answers:

1) when in pn.726 the problem still occurs when user is logged in;

2) (almost OT) some months ago the postnuke team was broken and from the original developers a new team and a new project came out: xaraya.
The last release appairing to be portable to xaraya was .714 (some of the versions that came out after that where more or less buggy).
So I decided to keep all my live sites at .714, waiting for the official xaraya release to move to that new system (like me, several other people did the same).
Now, .726 seems to have corrected bugs and improved api compliance, and I've installed it in my local testbox.
Next release (pn . 8 ) is going to adopt smarty as template engine, and a lot of differences will become evident.

I must admit that I'm a little bit confused: xaraya is a very powerful system, but also quite steep in learning - you can do beautiful things, but everything has a price. So I have some doubts.
And Coppermine doesn't work in xaraya  :!:
Sesto Avolio

DJMaze

Ok then:

- where can i download latest release of xaraya ?
- Shall install 714 local
- You can give me urls where the errors occure ?
  (ex.: modules.php?op=modload&name=coppermine&file=usrmgr)
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

eolica

Quote from: "DJMaze"- where can i download latest release of xaraya ?
On sourceforge: http://sourceforge.net/projects/xaraya/

Quote from: "DJMaze"- You can give me urls where the errors occure ?
  (ex.: modules.php?op=modload&name=coppermine&file=usrmgr)
Easier to say where it doesn't :(  :
- modules.php?op=modload&name=Coppermine&file=editpics&mode=upload_approval
- modules.php?op=modload&name=Coppermine&file=reviewcom
- modules.php?op=modload&name=Coppermine&file=help
Sesto Avolio

eolica

Since I'm probably the only one testing under postnuke, I'll continue posting bugs in this thread.

Well, when calling to show a category:

In phpnuke is:
modules.php?name=Coppermine&cat=4 :lol:

In postnuke has been changed to:
modules.php?op=modload&name=Coppermine&cat=4 :cry:

while it should be:
modules.php?op=modload&name=Coppermine&file=index&cat=4 :idea:

I don't know where should be changed    :?:
Sesto Avolio

DJMaze

some $CPG_URL need to be changed to $CPG_M_URL
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

eolica

Not bad as a starting point:
a short search for $CPG_URL gives a list of 36 files :cry: :
- 5 files under /include
- 12 files under /themes/default
- 19 files under /

while $CPG_M_URL is only in 4 files
Sesto Avolio

DJMaze

fixed :D

replace all $CPG_URL in index.php to $CPG_M_URL
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

eolica

Replacing in index.php solved the basic link for categories;
the problem is still present when clicking on the breadcrumb.

To solve I changed the breadcrumb function in /include/functions.inc.php:

function breadcrumb($cat, &$breadcrumb, &$BREADCRUMB_TEXT)
{
    global $album, $lang_errors, $lang_list_categories, $lang_meta_album_names;
    global $CONFIG, $CURRENT_ALBUM_DATA, $CURRENT_CAT_NAME, $CPG_URL, $CPG_M_URL;
    if (($cat == 0) && $album != '') {
        if (is_numeric($album)) {
            $result = db_query("SELECT title FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = '" . $album . "'");
            if (mysql_num_rows($result) == 0) cpg_die(CRITICAL_ERROR, $lang_errors['non_exist_cat'], __FILE__, __LINE__);
            $row = mysql_fetch_array($result);
            $breadcrumb = '<a class="statlink" href="' . $CPG_M_URL . '">' . _HOME . '</a> > ' . $row["title"] . ' ';
        } else {
            $breadcrumb = '<a class="statlink" href="' . $CPG_M_URL . '">' . _HOME . '</a>' . $breadcrumb . ' > ' . $BREADCRUMB_TEXT . ' ';
        }
        $BREADCRUMB_TEXT = _HOME;
    } else if ($cat > 0) {
        $breadcrumb_array = array();
        if ($cat >= FIRST_USER_CAT) {
            $user_name = get_username($cat - FIRST_USER_CAT);
            $user_id = get_userid($user_name);
            if ($user_id < 2) $user_name = 'Mr. X';

            $breadcrumb_array[] = array($cat, $user_name); //$row['user_name']
            $CURRENT_CAT_NAME = sprintf($lang_list_categories['xx_s_gallery'], $user_name);
            $row['parent'] = 1;
        } else {
            $result = db_query("SELECT catname, parent FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid = '$cat'");
            if (mysql_num_rows($result) == 0) cpg_die(CRITICAL_ERROR, $lang_errors['non_exist_cat'], __FILE__, __LINE__);
            $row = mysql_fetch_array($result);

            $breadcrumb_array[] = array($cat, $row['catname']);
            $CURRENT_CAT_NAME = $row['catname'];
            mysql_free_result($result);
        } while ($row['parent'] != 0) {
            $result = db_query("SELECT cid, catname, parent FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid = '{$row['parent']}'");
            if (mysql_num_rows($result) == 0) cpg_die(CRITICAL_ERROR, $lang_errors['orphan_cat'], __FILE__, __LINE__);
            $row = mysql_fetch_array($result);

            $breadcrumb_array[] = array($row['cid'], $row['catname']);
            mysql_free_result($result);
        } // while
        // if (($album!='')&&(!is_numeric($album)){
        // $result = db_query("SELECT title FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = $album");
        // $row = mysql_fetch_array($result);
        // mysql_free_result($result);
        // $breadcrumb_array[] = array('', $lang_meta_album_names[$album]);
        // }
        $breadcrumb_array = array_reverse($breadcrumb_array);
        $breadcrumb = '<a class="statlink" href="' . $CPG_M_URL . '">' . _HOME . '</a>';
        $BREADCRUMB_TEXT = _HOME;

        foreach ($breadcrumb_array as $category) {
            $link = '<a class="statlink" href="' . $CPG_M_URL . '&cat=' . $category[0] . '">' . $category[1] . '</a>';
            $breadcrumb .= ' > ' . $link;
            $BREADCRUMB_TEXT .= ' > ' . $category[1];
        }
        // Add Link for album if $album is set
        if (is_numeric($album)) {
            $link = '<a class="statlink" href="' . $CPG_URL . '&file=thumbnails&album=' . $album . '>' . $CURRENT_ALBUM_DATA["title"] . '</a>';
            $breadcrumb .= ' > ' . $link;
            $BREADCRUMB_TEXT .= ' > ' . $CURRENT_ALBUM_DATA['title'];
        }
    }
}


(just replacing $CPG_URL with $CPG_M_URL - except for the call to thumbnails) and adding it to GLOBALS
Sesto Avolio

eolica

(I hope it will not be lost)

Now that I can go to categories, I've discovered another bug.
This happens when I want to go to User galleries:
QuoteThere was an error while processing a database query.

While executing query "SELECT pn_uid, pn_uname, COUNT(DISTINCT a.aid) as alb_count, COUNT(DISTINCT pid) as pic_count, MAX(pid) as thumb_pid FROM nuke_users AS u INNER JOIN nuke_cpg_usergroups AS g ON user_group_cp = group_id INNER JOIN nuke_cpg_albums AS a ON category = 10000 + pn_uid LEFT JOIN nuke_cpg_pictures AS p ON (p.aid = a.aid AND approved = 'YES' ) GROUP BY user_id ORDER BY pn_uname" on 0

mySQL error: Unknown column 'user_id' in 'group statement'
Sesto Avolio

DJMaze

index.php line 224 or around that change           "GROUP BY user_id ORDER BY $field_user_name";

into           "GROUP BY $field_user_id ORDER BY $field_user_name";
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

eolica

Of course it works!
Do you need more bugs?  :lol:
(I've them)
Sesto Avolio

DJMaze

There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

eolica

Well.
One for you, fresh of ice:

Switching to User mode doesn't work. The "Leaving admin mode ..." screen appears, and clicking "continue" I'm back with the Admin menu buttons
Sesto Avolio

DJMaze

Ehm eolica i already solved thatone and a bunch more.
Including almost all header errors.

Shall i zip it up and send URL in a PM ?
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

eolica

Sesto Avolio