Menu

#2227 [3863] Undefined index in Gallery2

v4.1.5
open
nobody
None
5
2014-08-30
2008-09-14
No

The following errors now occur when Gallery2 is launched from the taskbar:

ERROR 8: Undefined index: scheme
0 Error occurred on line 69 of file pgv.php in function mod_gallery2_load
1 called from line 39 of file index.php in function mod_gallery2_run
2 called from line 34 of file index.php in function include_once
3 called from line 75 of file module.php in function require_once
4 called from line 39 of file index.php

ERROR 8: Undefined index: host
0 Error occurred on line 69 of file pgv.php in function mod_gallery2_load
1 called from line 39 of file index.php in function mod_gallery2_run
2 called from line 34 of file index.php in function include_once
3 called from line 75 of file module.php in function require_once
4 called from line 39 of file index.php

Discussion

  • David Richmond

    David Richmond - 2008-09-21

    I think most of the problems connected with launching Gallery2 are related to G2EmbedDiscoveryUtilities.class. I've now hard wired the locations in pgv.php and all seems to work as expected.

     
  • Greg Roach

    Greg Roach - 2008-09-22

    Which locations did you hard-wire?

    Is it something that needs to be submitted back to the code?

    I don't think any of the current developers use Gallery2, so we can't easily investigate.

     
  • David Richmond

    David Richmond - 2008-09-22

    Greg,

    I found a 'solution' to the problem in an old thread [<<No images show up in Gallery2 !>><<By: Ray (raysur) - 2007-08-15 22:04>>]and everything now works (even if it is by coincidence!).

    I changed both lines [72 & 73] in pgv.php for embedUri and g2Uri to the actual locations:

    ---------------------------------------------------------------------------------------
    $init = GalleryEmbed::init(array(
    'embedUri' => "/dbxs/index.php?mod=gallery2",
    'g2Uri' => "/dbxs/modules/gallery2/",
    'activeUserId' => $uid,
    'activeLanguage' => $language_settings[$LANGUAGE]['lang_short_cut'],
    'apiVersion' => array(1, 1)
    ---------------------------------------------------------------------------------------

    Also in the modules area is a documented display problem regarding the style sheets for punbb using IE6 and concerns lines 22 and 23 which I changed to:

    /* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/
    * HTML body{font-size: 62.5%}
    * .pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP {
    * font-family: Verdana, Arial, Helvetica, sans-serif;
    * font-size: 1.1em;
    * }
    /* End IE Win Font Size */

    I don't claim to understand it; but it seems to work!

     
  • Greg Roach

    Greg Roach - 2008-09-24

    From your changes, I guess the real issue is that the code assembles a URL, but forgets the path. i.e. it assumes your installation is in http://www.example.com/ instead of http://www.example.com/path/

    Perhaps change line 69 to include something like:
    $bits['path']
    or
    dirname($bits['path'])

    If this works, it would be a more correct/portable solution.

     
  • David Richmond

    David Richmond - 2008-09-24

    The $bits['path'] attempt gave the same errors as above.
    I've no idea how to enter the other string without parse errors etc. (It would probably help if I could READ this stuff.)
    I think it's probably only one part of the equation anyway as it has to be assembled in G2EmbedDiscoveryUtilities.class?
    I tried to READ this file too; but I think it's in Cantonese?

     
  • Greg Roach

    Greg Roach - 2008-11-17
    • milestone: --> v4.1.5
     

Log in to post a comment.