Gallery 1.5.1-RC1 Bug Reports

ckdake
ckdake's picture

Joined: 2004-02-18
Posts: 2258
Posted: Sat, 2005-07-23 21:05

This topic is a for users who have installed Gallery 1.5.1-RC1 and have specific bugs to report.
General troubleshooting questions do NOT go in this thread, and will be moved or deleted.

Once reported bugs have been acknowledged and fixed, the bug will be noted here, and responses will be deleted to keep the thread readable.

The known list of bugs in 1.5.1-RC1, and their statuses:

Fixed:

    - RC2-b1 : Embedded Urls are wrong generated.

    - RC2-b2 : CSS Stylesheets were displayed to early when embedded.
    This caused warnings etc. when Environment sends headers.

    - RC2-b5 : Missing { in Mail classes causes an error when sending mails via smtp.

    - RC2-b6 : Various Mailing problems.
    o Recipients ($to) for gallery_mail() where mixed in some cases.
    o Emailprefix should be a prefix, not a suffix ;)
    o emailLogMessage() was not compliant to gallery_mail().
    o unhtmlentities() on some email subjects

    - RC2-b9 : A link to mainpage was shown in slideshowbreadcrumb, regardless wether return to was off.

    -RC2-b12

    - Postnuke related adaptions for new Versions.
    o urls

    o user / userdb
    o language
    o stylesheets in wrapper.header
    Thanks to msandersen

    - Ecard and stampt preview when embedded.

    -RC2-b13: Deleting comments via overview when embedded.

    -RC2-b14:
    Embedded Urls now are complete. Not just the path
    Security fix for Postnuke from msandersen

Investigation in progress:

Rejected:

    - Problems with nonascii albumnames on windows.
    Verified on Apache/Windows. (IIS is not supported)

[/]

[/]

[/]

 
d0me

Joined: 2005-07-24
Posts: 9
Posted: Sun, 2005-07-24 08:08

i have upgrade this release,
got problem with link album in my postnuke ,

the release before album link like this :

http://www.myportalname.com/modules.php?set_albumName=zoo&op=modload&name=gallery&file=index&include=view_album.php

but this release i saw the link like this :

http://www.myportalname.com/modules/gallery/modules.php?set_albumName=zoo&op=modload&name=gallery&file=index&include=view_album.php

one more thing,

i am using autotheme , when i want custom my modules there are no gallery modules in modules list at autotheme admin, so everytime i open my gallery my postnuke will show center and right block too,this is not nice looking.how to fix this ?

thanks

 
dc2447

Joined: 2002-09-22
Posts: 130
Posted: Sun, 2005-07-24 09:21

Does this fix the problem of albumdb.dat getting constantly corrupted on large galleries?

 
ckdake
ckdake's picture

Joined: 2004-02-18
Posts: 2258
Posted: Sun, 2005-07-24 14:21

dc2447: What problem are you refering to? I have not heard any reports of such a problem.

 
Jordan_01002

Joined: 2005-02-14
Posts: 1535
Posted: Sun, 2005-07-24 15:52

I think he's refering to this thread: http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=145338

As I understood it from this and a few other related threads, it's not so much a problem with the albumdb getting corrupt from large galleries per say so much as from multiple simultaneous uploaders/users causing problems. He's had this explained to him, though, and been pointed towards G2 as a way to remove the issue. I'm not sure why he is bringing it up again; he's already let us know that he thinks gallery is junk and implied he's not using it anymore.

 
msandersen

Joined: 2005-07-29
Posts: 13
Posted: Sat, 2005-07-30 16:39

I've downloaded and tested version 1.5.1-rc2 cvs b3. Some quick observations:
As mentioned above, the link to Recently Viewed etc has the photo id prefix of 'item.', and hence the links don't work.

Whereas I'm in an English locale (Australia), I did a test of multilingual support. I created an album added some photos, and then renamed it successfully to
test-æøå
using Danish characters in the ISO-8859-1 character set (same as English), and standard in most fonts.
The album directory, which is to be visible to the web, is created with those characters. However, the Web was unfortunately standardised on US-Ascii long ago, so these characters are URL-Encoded. So, all the image links become, for instance,
/albums/test-%E6%F8%E5/exile035.thumb.jpg
which obviously break.
As an experiment, I renamed the directory directly to test-%E6%F8%E5
The album thumbnail is now visible, but the album itself is now inaccessible, not surprisingly.
Although an unusual situation, there also needs to be some checking on the name. Trying to edit the album title of the album with the renamed dir, on saving it gives this error:
Notice: Undefined property: album in C:\Apache2\htdocs\pntest\modules\gallery\edit_field.php on line 30
Fatal error: Call to undefined function: save() in C:\Apache2\htdocs\pntest\modules\gallery\edit_field.php on line 43

If the directory cannot be found, it should fail more gracefully or prompt the user.
Trying to rename the album to test-%E6%F8%E5, it instead creates test-E6-F8-E5, striping out the % sign.

So, unless this is an issue with the System locale, I would suggest the directories be created URL-encoded. The links will look correct in the browser. I'm sure there are lots of non-English users, so this issue must have been brought up before. I haven't used Gallery for some years, nor an expert on http, so there could be a simple answer to this that I'm missing.

 
toastmaster

Joined: 2003-05-01
Posts: 219
Posted: Sat, 2005-07-30 17:31
dc2447 wrote:
Does this fix the problem of albumdb.dat getting constantly corrupted on large galleries?

Still happening in 1.5.1 RC1, which is a shame as it takes a while to sort it out each time. As this bug has been known about for at least 4 months, I was hoping it might be resolved now. Any news on a fix in a later release? Still love Gallery, though!

 
msandersen

Joined: 2005-07-29
Posts: 13
Posted: Sat, 2005-07-30 18:49

I downloaded version 1.5.1-rc2 cvs b3, specifically to test it for ShortURL support for PostNuke. I've done some work on a core implementation of ShortURLs, rather than the Xanthia hack currently being used, and wanted to check the state of Gallery integration.

I notice that there are problems in the integration with PN0.75 and PN0.76rc4, as well as there being a need to update its PostNuke-URLs. Specifically, the stylesheets aren't included and the users aren't logged in. On the URL side, Gallery still use the old module.php?op=modload&name=gallery&file=index type url, but with the Gallery variables coming first, except for 'include', which has a .php exension. A long ugly url not ideal for the Xanthia shorturl filter (there's an early rule in the htaccess file to only process files with htm, html, or phtml extensions). The modules.php file is now just a placeholder for older modules and simply includes index.php.

So, basically, I looked into it and fixed the integration scripts in a number of files. It now works natively without PastNuke (which isn't working in the pn0.76rc anyway, it's being phased out). The trouble was that the integration relied on some very old code and deprecated variables, presumably pre-0.7x (before my time with PN, anyway). Even pn0.726 uses Legacy function support for it. The stylesheet wasn't being included in Xanthia themes because Gallery reads the header.php file and inserts its stylesheets directly, but Xanthia is a templated environment that doesn't use the header.php file. Furthermore, as of pn0.76, heaser.php is a placeholder that only has a function call to create the templated header. Evben lagacy themes get a templated header. Parsing this file to insert a stylesheet link was never necessary in pn0.7x anyway, that's what the $additional_header array is for.

Some notes on this patch:
For Xanthia themes or any theme in pn0.76 (where older themes have templated headers as well), it will not include the two Gallery stylesheets at all, rather rely on the templated PostNuke header including any module style in /pnstyle/style.css, which is provided. For older or AutoTheme themes in pn0.75 or older, it includes the two Gallery stylesheets via the PostNuke $additional_header array.
PostNuke integration has been fixed in a number of files, especially init.php (for User integration), index.php, and /html_wrap/wrapper.header.default.
My original purpose was to provide PostNuke ShortURL support for Gallery. This is done in /lib/url.php and /layout/navigator.inc.
I also couldn't help myself and did some grammar and spellchecking on the Setup wizard, as well as where I found them in the files I modified. And I cleaned up the CSS files as well. That's just the order and neatness freak in me.

The PostNuke URLs have been changed to the current index.php?name=gallery for older modules in url.php, and the order of arguments in the query string has been fixed to put the Gallery ones last.
Also, because I wanted URL consistency with the current Xanthia filter rules, I made url.php strip the .php prefix from the 'include' argument for the URL from embedded systems, which is added back in index.php for the include. There seem to be no adverse effects of this, while having nicer URLs. Only tested on PostNuke, though.

A note on the PostNuke ShortURLs: This is an entirely unofficial implementation for pn0.75 and the upcoming pn0.76 using Virtual Directories much like the standalone Gallery's shortURLs. None of the current official PN releases support Virtual Directories, so this would break things in an unmodified PN system. But since they are only turned on with an unofficial config var, that is not a problem. The reference implementation is this one, and available here. The pn0.76 package contains a number of other experimental updates. So it's only for test sites. Some of it is in CVS for the next release, but not the shorturls as far as I know. It may only make it for pn0.8. Only Gallery's url.php has been modified for this, but navigator.inc has been made to check a var set in index.php ($PNShortURLs) if they are on, as well as if the standalone gallery Rewrite option is enabled, and if so uses the makeAlbumUrl API.

Assuming an album called Elvira and a picture called vampire10, URLs look like this:
main page
/gallery/albums.html
link to any included file, eg slideshow, on the main page:
/gallery/slideshow.html
Link to the Elvira gallery, as well as Navigator links:
/gallery/Elvira/page1.html
image link in the album:
/gallery/Elvira/view-vampire10.html
link to slideshow in the album:
/gallery/Elvira/slideshow.html

Well, you get the idea.
I also tinkered with the standalone Gallery Rewrite rules, so that the included files and albums would appear much like the PostNuke links above:
/modules/gallery/user_preferences.php?gallery_popup=true
/modules/gallery/Elvira/vampire10
/modules/gallery/Elvira/view_photo_properties.php?index=2&type=popup

Gallery 1.5.1 PostNuke update

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Sat, 2005-07-30 18:59

Hello msandersen,

i dont really "get the idea".
I will install latest PostNuke and see if Gallery 1.5.1 works in it or not.

Your Patch seems at least to me feature request.
But i may wrong to a lack of english and postnuke knowledge.

I will answer here again when i have done my PN tests.

Jens

 
msandersen

Joined: 2005-07-29
Posts: 13
Posted: Sat, 2005-07-30 19:30

It's for people with PN, first of all it fixes the integration problem with Pn 0.75 (and upcoming pn0.76) as noted, users not being signed in and stylesheets not being included. That's mainly in the files init.php and navigator.inc, as well as various little things in other places. That part is a bugfix request, to update the integration bit. I could list the code I've changed, but a diff of the files can do that too. I use EditPad Pro on Windows, it has a handy compare function.

I haven't tried G2 yet, I understand there's no PN integration there. I don't know if there's any *Nuke integration at all, be it Mambo or whatever.

If you don't know PN, then it's a bit to take in to install etc. I suppose. The ShortURL stuff was on someone else's request and my own fun, it's not an official part of PN at this time. They only work with the unofficial PN patch I linked to.

BTW, strange that the umlau-links work for you, maybe there's changes in the later b5 release? More likely it's locale or platform specific. As mentioned, on my Windows system, it creates the folder test-æøå, not test-%E6%F8%E5, and the links break. Your version would have to have created the url-encoded folder, unlike on mine. Is the physical folder named with umlauts, or url-encoded?

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Sat, 2005-07-30 19:40

Hi

1.)
I installed latest PN 0.760RC4

Works fine with Gallery 1.5.1
http://jems.de/postnuke/html/index.php?name=gallery

Just a rendering issue with Firefox and some frames.
Gallery also detecs fine that i am logged in.
It detecs wether i am a normal user, or admin.

So _i_ see no problem with Postnuke.

2.)
No changes were made regarding album names.
But my server is an Apache on a Linux machine.

I will install Apache on Windows and do my Umlaut test again.

Jens

 
msandersen

Joined: 2005-07-29
Posts: 13
Posted: Sun, 2005-07-31 16:14

Weird. Just to prove to myself I'm not crazy, I overwrote the gallery install with the gallery1.5.1 b3 files again and ran it unmodified. No user integration or stylesheets. Looking at the code, there can't be, in particular the stylesheet. It is impossible for that code to insert the stylesheet in pn0.76; and Xanthia themes in pn0.75 don't use header.php. I copied my changed files over, and it worked again.
If you say by using a Xanthia theme, like PostNukeBlue or SeaBreeze, you can look at the source code and see the Gallery stylesheet links, I'll scream! Well, maybe just cry.

Mind you, I'm not using the PastNuke module, which is for supporting old deprecated modules by including old functions, as the Gallery documentation says is essential. I'm talking about updating the code to use current PN APIs.

For instance, in init.php, from line 217, I now have

            /* Load our user database (and user object) */
            $gallery->userDB = new PostNuke_UserDB;
            $userid = pnUserGetVar('uid');
            if (isset($userid)) { // $GLOBALS['user']
            	$gallery->session->username = $userid; 
            }
            if (isset($userid) && pnUserLoggedIn()) {
            	$user_info = pnUserGetVars($userid);
            	$gallery->session->username = $user_info["uname"]; 
            	$gallery->user = $gallery->userDB->getUserByUsername($gallery->session->username);
            }

As far as I can tell, PostNuke no longer uses the $user variable, and certainly they recommend using the API command pnUserGetVar(); for user variables such as User ID or name. Similarly pnUserLoggedIn() checks if the user is logged in using the PN API.

Also, in html_wrap/wrapper.header.default, in your current version it opens header.php with fopen, reads it to find <head, and adds the stylesheets after it. By the comments' own admission, this is inefficient. And entirely unnecessary for PostNuke.
My version reads:

	case 'postnuke':
		// If using Xanthia theme, or 'classic' or AutoTheme under pn0.76 or greater, 
		// module stylesheet will be included by a PostNuke template.
		if (defined('_XANTHIA_ROOT_PATH') or substr(_PN_VERSION_NUM, 0, 7) >= "0.7.6.0") {
			include_once('header.php');
			OpenTable();
			break;
		} else {
			global $additional_header;
			$additional_header[] = getStyleSheetLink(). "\n";
			include_once('header.php');

			// Changing the $index only works in older 'classic' themes. 
			global $index;
			$tmp_index = $index;
			$index = 0;

			OpenTable();
			$index = $tmp_index;
		}
		break;

This relies on the folder and file /pnstyle/style.css being provided, since the templated Xanthia themes include it by default.

Another (small) change is in /lib/lang.php, line 112:

	case 'postnuke':
	    $envLang = pnSessionGetVar('lang'); // $_SESSION['PNSVlang'];
	    break;

Again, using the PN API to get the current language the official way. Parsing my PostNuke directory with a Grep tool, I find no mention of PNSVlang anywhere, and echoing it returns nothing.

In both classes/postnuke0.7.1/User.php and UserDB.php, there's an update to the Database call:

		// PN0.75 up use a different format
		if (substr(_PN_VERSION_NUM, 0, 7) < "0.7.5.0") {
			list($dbconn) = pnDBGetConn();
			$pntable = pnDBGetTables();
		} else {
			$dbconn =& pnDBGetConn(true);
			$pntable =& pnDBGetTables();
		}

If you look in PostNuke's Example module, that is the format to use for database connections as of PN0.75.

In /lib/url.php, the makeGalleryUrl function is updated to current URLs for old modules:

		// This is the old-style URL.
		$args = array('name'=>$GALLERY_MODULENAME, 'file'=>'index') + $args;
		// include *must* be last so that the JavaScript code in
		// view_album.php can append a filename to the resulting URL.
		$args["include"] = $target;
		$url = pnGetBaseURI()."/index.php";

This produces index.php?name=gallery type URLs, instead of the deprecated modules.php?op=modload&file=index&name=gallery. modules.php is now only a placeholder, it only includes index.php.

Those are the most important updates and bugfixes. Most of the rest is cosmetic, like the setup files has been spellchecked and the css files cleaned up.

I had a look at G2, there is a PostNuke integration project, but it hasn't been updated since January, using beta1. I've updated it with beta4 and had a quick look. The developer site mentions the user/group synchronisation is not complete yet, so I can't do much in the embedded version as of yet it seems.

BTW, I still can't use æøå or similar in the Album names. Weird. Must be a platform thing. I don't need to use such characters myself though.

------------------------------
Windows XP Pro
Apache 2.0.54
PHP 4.3.0

 
toastmaster

Joined: 2003-05-01
Posts: 219
Posted: Mon, 2005-08-01 09:52
toastmaster wrote:
dc2447 wrote:
Does this fix the problem of albumdb.dat getting constantly corrupted on large galleries?

Still happening in 1.5.1 RC1

I don't want to seem like I'm banging on about this problem, but it has affected many installs over quite some time, but I've never seen it in an "investigation" thread. Does this mean this recurrent problem is not going to be looked at at all in the 1.x gallery series?

 
Schmuend2k

Joined: 2005-08-02
Posts: 2
Posted: Tue, 2005-08-02 11:59

Hi,
i'm not very good in english but i have a problem :-)

Ok, my problem:
I have a nested album and in this album there are the click counter under each picture (Pics: 3*3). If I now click on the very first picture in this album the click counter goes to 1 but not only on the clicked image but on the second image in the gallery the counter also goes to 1.
This is everywhere in the nested album and i have nothing changed in the view_album.php

 
Ansolon
Ansolon's picture

Joined: 2003-01-14
Posts: 46
Posted: Wed, 2005-08-03 17:41

First of all thumbnails of sub-albums in Mainpage add-on is very great that we already do it manually over a year and it makes easier everything..

I am using embed gallery in Phpnuke 7.8 version since I saw a little bugs in 1.5.1 RC1 I setup 1.5.1 RC2 b6. And here is some problems I faced it bug or not you decide.

Problem 1: While I am browsing from nuke in to the gallery I tried to delete comments with using view comments link which is located in mainpage. I checked the comment and click to "Delete Marked Comments" button then nothing has been deleted but the browser goes to "http://www.ankarasosyete.com/view_comments.php" I think it worked like standalone gallery however I am using it from nuke. While I am deleting from standalone mode with the same way it is working. On the other side the other comment deleting option while looking a picture is also working...

Problem 2: Since I opened the comments option I also setup email feature. Moreover the system is also sending info mails about newly added comments however its sending the mails like this

Quote:
A comment has been added to modules.php?set_albumName=facesnewhall&amp;id=anc&amp;op=modload&amp;name=FotoGaleri&amp;file=index&amp;include=view_photo.php by sollemajor in album modules.php?set_albumName=facesnewhall&amp;op=modload&amp;name=FotoGaleri&amp;file=index&amp;include=view_album.php.

*** Begin comment ***
burasý olu eller havada býle degýl
***End comment ***

Because of it doesnt give full address its hard to reach the site.
On the other side the system also sending activity alerts on the site in this message the address is also looking like above.

And Small Question: I didnt setup Gallery 1.5.1 RC2 b6 as stand alone its embed to phpnuke. While I or somebody go to stand alone adress of Gallery there will be blank page. If it knows I am admin user it shows the standalone page. It is because of embed to nuke or I may have a problem?

Thanks

Gallery: 1.5.1 RC2 b6
Apache: Apache/1.3.33 (Unix)
PHP: 4.3.11
mysql: 4.0.24
Graphics: NetPBM
OS: Redhat Enterprise 3.0
Browser: Internet Explorer 6.0

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2005-08-03 18:20

Schmuend2k,
i guess you are using Firefox. The behaviour you are seeing is a preload feature.
FF load the next page, that why the counter increases.

doug-b,
FAQ C.34

 
Jordan_01002

Joined: 2005-02-14
Posts: 1535
Posted: Wed, 2005-08-03 19:45
Tim_j wrote:
Schmuend2k,
i guess you are using Firefox. The behaviour you are seeing is a preload feature.
FF load the next page, that why the counter increases.

As discussed in http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=30152

(Feel free to delete this to keep this thread clean)

 
jpeadro

Joined: 2003-12-24
Posts: 198
Posted: Thu, 2005-08-04 03:08
jpeadro wrote:
floridave wrote:
Jeff, Are you sure both 1 & 2 are not FAQ Gallery:c.34?

Damn that was it. I totally forgot to check the FAQs w/this release. my bad.

Just tested the eCard and the link for the pic. I tested has an equals sign in the url.

http://www.peadro.net/al=ums/JeffMonicaPeadroBuildTheir1stHouse/aaj.sized.jpg

It should be albums instead of al=ums

 
pezz

Joined: 2005-08-04
Posts: 1
Posted: Thu, 2005-08-04 09:10

Hi,

I upgraded to 1.5.1rc1 and now I've been unable to upload pictures normally. I upload using URL and enter server directory into the form. It finds files normally, but after file selection confirmation it uploads some random files correctly but composes URLs for most of the files wrongly, so it gives me bunch of errors about it

Could not open url http//http///home/pezz/eunis2005/IMG_1165.JPG//
Could not open url http//http///home/pezz/eunis2005/IMG_1169.JPG//
Could not open url http//http///home/pezz/eunis2005/IMG_1171.JPG//

Tried alternative way of entering webservers directory, but the same problem occured. I've tried several times and each time different set of files fail to upload. I applied RC2-b1, but it didn't make anything better and I haven't had enough free time to find out the problem by myself.

 
Ansolon
Ansolon's picture

Joined: 2003-01-14
Posts: 46
Posted: Thu, 2005-08-04 12:10

Hi again...

I activated ecard however I couldnt see anything about ecard feature, there is no link or anything else. Email feature is also enabled. What sould be the problem?

 
jpeadro

Joined: 2003-12-24
Posts: 198
Posted: Thu, 2005-08-04 12:22
Ansolon wrote:
Hi again...

I activated ecard however I couldnt see anything about ecard feature, there is no link or anything else. Email feature is also enabled. What sould be the problem?

floridave wrote:
Jeff, Are you sure both 1 & 2 are not FAQ Gallery:c.34 ?

peace

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Thu, 2005-08-04 12:48

Ansolon,

When this option is enabled for an album, then go to a photo view.
There you will see a link.

See for example: http://jems.de/gallery-1.5.1/album18/t_look_brand_new

Jens

P.S.: i wil delete your and my post in some hours.

 
Ansolon
Ansolon's picture

Joined: 2003-01-14
Posts: 46
Posted: Thu, 2005-08-04 15:17

Tim

Thanks I saw it and its also working for me..

On the other side I couldnt translate these new words because of I couldnt find it in in TR core translation file. Will these files be updated for new version?

 
msandersen

Joined: 2005-07-29
Posts: 13
Posted: Thu, 2005-08-04 15:33

There's a possible security hole in the current PostNuke integration script, as reported by others in the Gallery *Nuke forum "All users are Superusers". The problem is in classes/postnuke0.7.1/User.php it relies on getting the module name by declaring the variable $name global, and this is then used in the security check
$this->isAdmin = (pnSecAuthAction(0, "$name::", '::', ACCESS_ADMIN));
However, this cannot be relied upon to get the Gallery name, and may return empty, and thus may give anyone with Admin any access the ability to add or delete. The PostNuke API is the best way to get the module name:
$modname = pnModGetName();
and then have
$this->isAdmin = (pnSecAuthAction(0, "$modname::", '::', ACCESS_ADMIN));
Now only people with Admin access to Gallery will be able to edit/delete/administer pictures and albums.

 
Ansolon
Ansolon's picture

Joined: 2003-01-14
Posts: 46
Posted: Thu, 2005-08-04 15:46

Ecard problems

Ok I saw the send photo as ecard link then I tried to send an ecard for testing. here are the problems while I am using the gallery embed to nuke..

1 - ) After popup opens there is a dropdown menu that user can choose the stamp however the stamp picture is not shown. on the right side of drop down menu there is a little icon that writes while mouseover "helpIcon" that should be stamp picture I think.. When I click this button newer pop-up opens that is got to the unexisting page.
PS: I tried Tim's standalone version that I understand we just choose the stamp it will now shown. However there should be question mark icon picture which I have not in embed gallery. After that I undersand that After I click the question mark we can see the stamps which I also havent got..

2 - ) In the same "Ecard send form popup" there is also Preview Link. It is working Tim's standalone gallery. However in embed it is also goes to non-existing page.. is called www.ankarasosyete.com/_templates/leer.htm

Thats it for now..

On the other hand the ecard addon seems to work fine in embed gallery in phpnuke.

 
saidiadude

Joined: 2004-07-30
Posts: 15
Posted: Fri, 2005-08-05 16:10

Has this bug been fixed:
Sometimes the photo is clickable, other times it's not. Example:

Links:
Works: Main picture shown is not clickable.
Bug? Main picture is clickable. New page generated is the same and pic is clickable, etc.

Settings for both pages are the same.

OT: I integrated Gallery into the site - I intend to put the Gallery copyright info in the "About" section of the site. Does this meet the requirements of the license? Thx.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Sat, 2005-08-06 10:35

saidiadude,

if you tell me where is can find a sized version of your "buggy" photo, then i tell you why its not clickable.

I guess you change later the setting for the size of intermediates.

Jens

 
saidiadude

Joined: 2004-07-30
Posts: 15
Posted: Sun, 2005-08-07 19:38

Thanks. To access the pages, see the links in my posting above. The images arent the problem - it seems that Gallery makes the "large" picture clickable sometimes (at random?). If a user clicks on this picture, the same page comes up again (pic is clickable again, etc). Try it on the links above - the link titled "Bug" shows an example of this problem. Settings on both pages should be the same in that I did not change the settings - not sure if Gallery did.

 
brittm

Joined: 2005-08-05
Posts: 1
Posted: Mon, 2005-08-08 18:44

I am having the exact same problem as Ansolon concerning eCards with PHPNuke

Quote:
- ) After popup opens there is a dropdown menu that user can choose the stamp however the stamp picture is not shown. on the right side of drop down menu there is a little icon that writes while mouseover "helpIcon" that should be stamp picture I think.. When I click this button newer pop-up opens that is got to the unexisting page.

I'm running PHPNuke 7.7 and Gallery Gallery v1.5.1-RC2-cvs. The eCard feature works great in standalone, but when it is embeded into PHPNuke, it does not work. It appears to be a path problem when it is intergrated with phpnuke. Using gallery in standalone, the url is http://mydomain.com/modules/gallery/ and eCards works. Intergrated into phpnuke, the url is http://mydomain.com/ and obviously eCards wont work because the files don't reside in the home directory. Not sure if this is a Gallery issue or a phpnuke issue. I think the eCard feature is using the current directory it is being used in i.e. my phpnuke page is http://mydomin.com/ when I click preview I get error from this http://mydomain.com/ecard_preview.php. In Gallery I don't get an error and when I click preview it goes here: http://mydomain.com/modules/gallery/ecard_preview.php which is the correct directory. I'm guessing the eCard feature uses current domain instead of actual. Any ideas how to fix this?

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Mon, 2005-08-08 18:50

brittm,

which build exactly of 1.5.1-rc2-cvs ?

Jens

 
Ansolon
Ansolon's picture

Joined: 2003-01-14
Posts: 46
Posted: Mon, 2005-08-08 22:24

brittm

I faced with same problems in Phpnuke 7.8 but After I upgraded with latest cvs which was called b12 until today... Everything works fine even in embed.

 
msandersen

Joined: 2005-07-29
Posts: 13
Posted: Tue, 2005-08-09 15:14

I downloaded the latest b13 build. There's still a bug affecting embedding in PostNuke. If Gallery is set as the Start Page in Settings Administration, as some people do, then Gallery will load as a standalone application, rather than embedded. This is because PostNuke's index.php checks a config variable for the start page/module, in which case the module name does not appear in the URL. Hence Gallery's check for embedding fails.

Fix:
A foolproof way of detecting PostNuke is to check for certain standard PostNuke defines, like _PN_VERSION_ID.
In Gallery's index.php, from the line $include =..., put:

$include = isset($_REQUEST['include']) ? $_REQUEST['include'] : null;
$postnuke = defined('_PN_VERSION_ID') ? true : false;

/*
 * Detect PHP-Nuke, Postnuke, phpBB2 or Mambo and react accordingly.
 * Gallery can run embedded in GeekLog too, but to catch this we need
 * config.php * Therefore we have to detect GeeLog in init.php.
 */

if ($postnuke || !strcmp($op, "modload") || !strcmp($mop, "modload") || isset($option) || isset($name)) {

Further down, replace
elseif (isset($GLOBALS['pnconfig']) && function_exists('authorised')) {
with
elseif ($postnuke) {

Also, not to be pedantic, in function makeGalleryUrl in /lib/url.php, should be updated to read something like

			case 'postnuke':
				if (substr(_PN_VERSION_NUM, 0, 7) >= "0.7.5.0") {
					// modules.php is deprecated in pn0.75+ and is only a placeholder for index.php
					$args = array('name'=>$GALLERY_MODULENAME, 'file'=>'index') + $args;
					$url = 'index.php';
				} else { // old-old style module call
					$args = array('op'=>'modload', 
						'name'=>$GALLERY_MODULENAME, 
						'file'=>'index') + $args;
					$url = 'modules.php';
				}
				// include *must* be last so that the JavaScript code in
				// view_album.php can append a filename to the resulting URL.
				$args["include"] = $target;
				break;

Note modules.php is only a placeholder in pn0.75+, index.php should be used instead.
Also this method ensures the PN variables come first, as in index.php?name=gallery&file=index&set_albumName=...

---------------
Simply echoing the stylesheet links in the middle of the page works, but is inelegant to say the least and presumably doesn't validate. For PN, using the $additional_header array to put the links in the header as previously indicated is preferable.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Tue, 2005-08-09 16:17

Hello msandersen,

first i would like to say thanks for all the info.

1.)
for some reason in the past we usedisset($GLOBALS['pnconfig']) && function_exists('authorised')

But i will enhance this with _PN_VERSION_ID

2.)
This is already fixed in b12
if (substr(_PN_VERSION_NUM, 0, 7) < "0.7.6.0") {

3.)
Since which version of PN $additional_header is used ?
I think this is only in newer PNs and i dont want to add another check as it works this way :)

Jens

 
msandersen

Joined: 2005-07-29
Posts: 13
Posted: Tue, 2005-08-09 18:02

2) The point above is, it should be 0.7.5.0 and above that use index.php?name=..., not 0.7.6.0, which isn't out yet. In the curent 0.75, modules.php is a placeholder for index.php for backwards compatibility. It shouldn't be used anymore.
And secondly, the format
$args = array('name'=>$GALLERY_MODULENAME, 'file'=>'index') + $args;
ensures PN variables are first, partly an issue of neatness.

3) $additional_header has been around for at least since the 0.7x series, as far back as I have used PN, several years (progress has been slow of late). There shouldn't be any site running anything older than pn0.72x for security alone, which has been around for some time, and since it is used extensively by modules, anyone with PN0.6x would have to upgrade PN anyway to install any current module. The integration code in Gallery seem to date back to 0.6x, a very long time ago.
As it works, it's not a priority, but it is 'untidy' not to have it in the header where practical.