Mambo and G2 embedding

d3vlabs

Joined: 2005-05-10
Posts: 100
Posted: Wed, 2005-06-01 00:34

Here's a small CSS(?) issue regarding using a G2 embedded into Mambo:

[img]http://d3v.clanhq.net/img/g2_css.gif[/img]

If you find a fix before me, please post it in the official G2+ Mambo Issues Thread:

http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=143555#143555

 
rza

Joined: 2005-05-08
Posts: 34
Posted: Thu, 2005-06-02 08:26

hi valiant, the problem seems to lie with the mirror username. if i click on the gallery without logging in, any of the pics are able to be displayed after clickin on it. but if i logged in as auser, i will get tat error.

Fatal error: Call to undefined function: getorderby() in /var/www/html/gallery2/modules/core/classes/helpers/GalleryChildEntityHelper_simple.class on line 480

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-06-02 08:42

rza, i really don't see how these things could be related.
please install the current nightly snapshot from http://galleryupdates.jpmullan.com.
empty the db table g2_externalIdMap, and try again.

 
rza

Joined: 2005-05-08
Posts: 34
Posted: Fri, 2005-06-03 02:10

i really suspect my problem lies in me previosuly renaming some kind of variable in mambo config to get something to work...i remembered it was something like MOS_GALLERY2_PARAMS_PATH. this part is the tricky part. it is not pointing to the correct file MOS_Mambogallery2.....

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-06-03 08:22

rza, can you reproduce the problem when you do a fresh G2/mambo install (just in parallel, i don't ask you to delete your installation)?

 
rza

Joined: 2005-05-08
Posts: 34
Posted: Sat, 2005-06-04 11:13

this is the original error

i renamed the created file mos_gallery2 to mambogallery2 to make it worked...
Table 'mambo.mos_mambogallery2' doesn't exist SQL=UPDATE mos_mambogallery2 SET
value='var/www/html/gallery2/' WHERE field='path'

i see that mysql has Mambo and gallery2 directory residing on /var/lib/mysql
in mambo, there are files with names mos_mambo....
while in gallery2, there are files with names with g2_....

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-06-04 11:50

rza, do you get this error when doing a fresh g2/mambo install or what's the matter?
and what's the error?
and what has this to do with the getorderby() error?

 
rza

Joined: 2005-05-08
Posts: 34
Posted: Sun, 2005-06-05 09:24

i am wondering about this too...why do users not logged in able to view all the photos as guest. clicking on thumbnails works fine for them...but logged in users are getting tat error!!....

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-06-05 09:28

rza, again, could you verify that you get this error with a fresh G2+mambo install? and why did you mention the "mambo.mos_mambogallery2" table? was this another problem you had?

 
rza

Joined: 2005-05-08
Posts: 34
Posted: Sun, 2005-06-05 09:29

i know the freaking problem now! it must have been something to do with permissions on gallery! i am working on it now..i am logged into mambo as admin n i am able to view gallery pictures....

 
rza

Joined: 2005-05-08
Posts: 34
Posted: Sun, 2005-06-05 09:45

i deleted all the users in gallery2. then i re-created again. but now i got this error for logged in users "Error (GALLERY_SUCCESS) * in at line 0"

 
rza

Joined: 2005-05-08
Posts: 34
Posted: Sun, 2005-06-05 09:50

do i have to create exactly the same username in mambo as in g2? any upper or lower case problem tat i may face?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-06-05 09:51

rza, you can't delete all users in G2 without doing a fresh G2 install afterwards. but perhaps you mean to say you deleted all entried in the g2_externalIdMap. that would be ok.

and when you post errors here to the forum, then post the complete error. the fragment from your last post is far to short.

 
rza

Joined: 2005-05-08
Posts: 34
Posted: Mon, 2005-06-06 05:02

even on albums i created by myself in g2 gives me this error

Fatal error: Call to undefined function: getorderby() in /var/www/html/gallery2/modules/core/classes/helpers/GalleryChildEntityHelper_simple.class on line 480

where is the permissions problem? this is weird....i am pulling out all strands of my hair..why does the admin and guest user does not have any problems when viewing the pics?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-06-06 05:05

1. remove all customizations (local folder, .tpl files you altered,...)
2. do a fresh install of mambo + G2, check the file integrity
3. report if you still get this weird getoderdy() problem

i can't help you like that. noone else is reporting the same error and you don't follow my recommendations...

 
rza

Joined: 2005-05-08
Posts: 34
Posted: Mon, 2005-06-06 05:11

i just did a fresh install again. and i am still getiing same error....i did follow your steps correctly. is there any software i can use to view the tables in mysql. like the .frm, .myd and .myi files...

g2 standalone works fine for guest,admin and my user account. weird weird weird.....

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-06-06 05:26

phpmyadmin (server), mysqlfront (client),... (when doing the fresh install, you should not "reuse tables", just use a new database and backup g2data if you wanna keep your old data).

 
rza

Joined: 2005-05-08
Posts: 34
Posted: Mon, 2005-06-06 05:50

it was a brand new table... :(

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-06-06 06:08

i just wonder why noone else has the same problem.

could you get again beta 3 (fresh codebase) and do a fresh install. and add some system information, maybe a phpinfo link to your post.

 
m7k

Joined: 2005-05-04
Posts: 7
Posted: Tue, 2005-06-07 12:39
valiant wrote:
m7k, that sounds really strange. but it's too few information to really think of what could have happened.
i guess you somehow lost your session (G2 thought suddenly, you're not a logged in user). but how would that lead to links that link to G2 standalone instead of embedded? i don't know.
i'd also revise that after mindless' next big multisite+embedded+rewrite+cookie change.

I still have the same problem. If I'm logged in as the administrator, no problems, but as soon as I log in as a registered user, after a couple of clicks in the gallery, I end up in the stand alone without getting any error messages. After this I have to log in again as administrator to access the galery.

I have absolutely no idea what's going on. If it's about 'losing session' it for some reason doesn't affect administrator, only the other users.

I have a G2 nightly build from June 6 (haven't changed any of the core files) and mambo 4.5.2.2.

 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Wed, 2005-06-08 03:25
valiant wrote:
i just wonder why noone else has the same problem.

could you get again beta 3 (fresh codebase) and do a fresh install. and add some system information, maybe a phpinfo link to your post.

just started seeing this problem after upgrading to beta3...

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Wed, 2005-06-08 13:11

artemido,

I use Mambo 4.5.2 and updated my G2 install to beta3 and never have that problem.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-06-08 13:54

KAC, which integration code are you using? who was the last author?
we need to clarify the mambo stuff a little. too many attached files in the forums etc.

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Wed, 2005-06-08 16:13

True, there are too many attached files and I don't know a "version" number, if you will.

I have followed this integration development close enough to know that I have all the latest itegration codes except for the last component update that michiel_1981 did including the user backend stuff. I never updated to that.

 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Thu, 2005-06-09 01:24

I'm using the 6/7/05 snapshot builds of g2 and the mambo integration that are available at http://galleryupdates.jpmullan.com/. I'm using Mambo 4.5.1(b, I think). When I performed the g2 upgrade I ensured that all of the old files were removed from the directory stored (verified by the upgrade script) and that all the files were completely unmodified (including some of the modified tpl files I had used in my initial integrations of the 5/7 (pre-beta3). Everything else seems to work fine (user accounts are moved across on initial connection, user galleries can be created, login works...everything!). The only problem I have is when I click on a thumbnail to bring up the sized version of the pic, and I only see this when I go thru the mambo-integration (i.e. it works fine on g2 stand-alone). The line # I get is slightly different (probably a version thing, obviously), but it's essentially the same error.

 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Thu, 2005-06-09 01:42

update:

I've found that the error only occurs when you are logged in. I've duplicated this on two installations (one of which was green field, the only difference being that it's mambo 4.5.2). If you're not logged into mambo and access the Gallery via the mambo integration (shows you as "Guest" and offers up the "Register" link in the top), everything works fine. As soon as you log into mambo, you start getting the error msg (Fatal error: Call to undefined function: getorderby() in /opt/htdocs/ramzvents-com/public/gallery/modules/core/classes/helpers/GalleryChildEntityHelper_simple.class on line 480)

Okay, so here's the really, really odd part... If you are logged into mambo as "admin" you don't see the error. If you are logged into mambo as some other user (even if the user is an administrator in both mambo and g2) that is when you start seeing the errors. Just found the bit about the admin a second ago when I was playing around with a few possible use cases...

 
gette

Joined: 2005-05-30
Posts: 9
Posted: Thu, 2005-06-09 19:42

Hello,
I'm using the snapshot of G2 and integrations from 06-09-05 and mambo 4.5.2.
I've got problems with users right for everybody. in the stand alone version everything works fine. But wen i go to mine gallery integrated in mambo, i've get the front page of gallery fine. but when i wanna jump in mine albums, mambo says:
"You don't have right to view this items" ( or something translated from dutch)
also when i login as u user i get this message.
I only can see mine albums when i login as an mine administrator account

greets
Gette

 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Thu, 2005-06-09 21:35

more information:

I ran thru the following use case as a user, admin, and guest:

1. access mambo main page
2. log in
3. click on link to embedded gallery
4. open first album
5. click on first picture
6. go to page to execute phpinfo()

In each case, I noticed that the http header data (namely the http_cookie) had some subtle differences.

as user: sessioncookie=4b6c78911a247b1d4c9a820e3ef2b04b; usercookie[username]=username; usercookie[password]=50be3f1e50be3f1e50be3f1e50be3f1e; GALLERYSID_34355e=27031eeebda9ec91801a39f7bfde98f0

as guest: sessioncookie=4b6c78911a247b1d4c9a820e3ef2b04b; GALLERYSID_34355e=bffe0c9d36eef6c250bf0c8de25d05ac

as admin: sessioncookie=4b6c78911a247b1d4c9a820e3ef2b04b; GALLERYSID_34355e=bffe0c9d36eef6c250bf0c8de25d05ac

Also, as guest I noticed that the URL contained an extra parameter tacked onto the end containing the GALLERYSID data where there was none in the other two requests. As stated before the guest and admin users function without difficulty. I scanned thru gallery2.php and noticed that the only portion of code that differentiates between users and guests+admin is below, so something must be happening in this code block that is causing problems with users... I suppose it could be a combination of other bits of code, but I didn't see anything else in the code that would execute for all users whose username != admin.

            if (!empty($my->username) && (strcasecmp($my->username, 'admin')!=0))
            {
                // Check to see if they have an album

                list ($ret, $rootAlbum) = GalleryView::_getItem();
                if ($ret->isError())
                {
                    return 0;
                }

                list ($ret, $childIds) = GalleryCoreApi::fetchChildAlbumItemIds($rootAlbum);
                if ($ret->isError())
                {
                    return 0;
                }
                if (!empty($childIds))
                {
                    list ($ret, $items) = GalleryCoreApi::loadEntitiesById($childIds);
                    if ($ret->isError())
                    {
                        return 0;
                    }

                    $found_album = false;
                    foreach ($items as $child)
                    {
                        if (strcasecmp($child->getTitle(), $my->username)==0)
                        {
                            // Yes, they have an album
                            $found_album = true;
                            break;
                        }
                    }
                    if ($found_album == false)
                    {
                        if ($special_action == 'create_album')
                        {
                            // If they want an album, create one!
                            CreateUserAlbum($my);
                        }
                        else
                        {
                            echo '<p>You currently don't have a photo album, but you're entitled to one. '
                                .'<a href="http://' . $HTTP_HOST . $PHP_SELF . '?' . $_SERVER['QUERY_STRING']
                                .'&special_action=create_album' . '">Create my album!</a></p>' . "\n";
                        }
                    }
                }
            }
 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Thu, 2005-06-09 22:07

verified--

if you comment that block of code out, it works great (for those that aren't programmers, add a /* prior to the if statement and a */ following the closing brace--be careful you get the right one)

 
artemido
artemido's picture

Joined: 2005-02-08
Posts: 24
Posted: Thu, 2005-06-09 22:12

for those of you not experiencing this error, could you check to see if you have the options for user albums turned on in mambo administrator?

 
solid_state

Joined: 2005-06-11
Posts: 4
Posted: Sat, 2005-06-11 04:29

Hi all,

I'm having a problem with the "upload applet" in G2 embedded in mambo v4.5.2 with integrations from 06-09-05.

I get an error message when clicking upload from the java applet:

"Gallery Remote can find no protocol implementation at the URL http://www.mysite.ca/mambo/. Check with a web browser that http://www.mysite.ca/mambo/ is a valid Gallery URL."

my gallery folder is located in /var/www/htdocs/mysite/gallery2
mambo folder is /var/www/htdocs/mysite/mambo

any help is really appreciated

Thanks
-Jason

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-06-11 04:41

set: config.php, mode.embed.only = false

 
gantenbein

Joined: 2005-06-11
Posts: 1
Posted: Sat, 2005-06-11 15:40

.... edited:

Sorry - I will think again and ask later.

THX.

 
solid_state

Joined: 2005-06-11
Posts: 4
Posted: Sun, 2005-06-12 05:09
valiant wrote:
set: config.php, mode.embed.only = false

Thanks for the quick reply.

however, it seems this setting is already set to false!

-Jason

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-06-12 11:04

solid_state, try the current nightly snapshot from http://galleryupdates.jpmullan.com
then clean your cookies in your browser and try again.

 
gette

Joined: 2005-05-30
Posts: 9
Posted: Sun, 2005-06-12 15:14

hello again,
does anybody has an sollution for mine problem

Greets Gette

 
sgm251070

Joined: 2005-06-15
Posts: 11
Posted: Wed, 2005-06-15 03:51
gette wrote:
... using the snapshot of G2 and integrations from 06-09-05 and mambo 4.5.2.
I've got problems with users right for everybody. in the stand alone version everything works fine. But wen i go to mine gallery integrated in mambo, i've get the front page of gallery fine. but when i wanna jump in mine albums, mambo says:
"You don't have right to view this itemsgreets

Hi I'm getting the same error. G2.0 beta 3 0.9.24 and mambo 4.5.2.2 and com_gallery2 dated 1/6/05 (as well as various other versions since). I can view gallery2 fine. I have set permissions to allow 1 gallery viaweable from a registered user, and all other galleries viawable from everyboby (works as expected). Until i try to view as a guest the images in mambo (clicking on images gives the unauthorised error message), i have to log into mambo as a user of some kind to be able to view these public galleries... Any ideas guys?... Ps, great work, best image gallery integration I have found.

Steve

 
m7k

Joined: 2005-05-04
Posts: 7
Posted: Sat, 2005-06-18 13:22
m7k wrote:
valiant wrote:
m7k, that sounds really strange. but it's too few information to really think of what could have happened.
i guess you somehow lost your session (G2 thought suddenly, you're not a logged in user). but how would that lead to links that link to G2 standalone instead of embedded? i don't know.
i'd also revise that after mindless' next big multisite+embedded+rewrite+cookie change.

I still have the same problem. If I'm logged in as the administrator, no problems, but as soon as I log in as a registered user, after a couple of clicks in the gallery, I end up in the stand alone without getting any error messages. After this I have to log in again as administrator to access the galery.

I have absolutely no idea what's going on. If it's about 'losing session' it for some reason doesn't affect administrator, only the other users.

I have a G2 nightly build from June 6 (haven't changed any of the core files) and mambo 4.5.2.2.

I finally had the time to do a clean install of gallery (nightly from 16/06) and now, finally, everything works perfetly.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-06-18 13:33

m7k, good to hear. it was indeed a strange problem.

 
solid_state

Joined: 2005-06-11
Posts: 4
Posted: Thu, 2005-07-07 03:18
gemdesign wrote:
Hello solid_state,
I saw your post about the g2 mambo integration. I'm getting the same error when trying to upload witht the remote applet. Have you found a solution for this?

I've tried updating with the latest packages I could find, but I still get the same error.

So if you've found a solution for this I'd appreciate if you'd let me know.

best regards
gemdesign

Hi there. I did manage to work around the problem. I installed gallery with the default gallery-2-beta-3 install straight off the gallery download page eg.

http://sourceforge.net/project/showfiles.php?group_id=7130&package_id=124241

and the latest version of the mambo integrations at the time which was something like 2005/04/05.

and that's all!

it appears that something in the newer releases has changed causing it not to work?

hopefully this works for you too.

-Jason

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-07-07 07:26

the newest G2 versions (1-2 weeks old) shouldn't have any problems with embedded / applets. (there's an IE issue: you get logged out in IE when using the applets, but that's an applet bug).

 
snapple

Joined: 2005-07-06
Posts: 18
Posted: Thu, 2005-07-07 14:36

hello .. running mambo 452 n G2 and G2 alone works fine... embedded no go... the pictures do not show up.. the boxes r there the wording is all there just no pictures

my fullpath to G2 is /var/www/html/gallery2

relative is ../gallery2

it all works fine stand alone...

 
kdizzle

Joined: 2005-07-06
Posts: 27
Posted: Thu, 2005-07-07 15:52

I am brand new here but did you play around with the path in the component?

Everything but my pictures worked when I used the settings:

Relative path to Gallery G2: /gallery2 #then I switched to the settings to

Relative path to Gallery G2: ../gallery2 #and everything looked funny

then:
Relative path to Gallery G2: gallery2 #SUCCESS everything works fine.

I am still trying to work on the 247 template to get rid of overlaps and strange settings but the links work.

Good luck and thank you all who are working on this project!

 
woll-knaeuel

Joined: 2005-04-30
Posts: 10
Posted: Wed, 2005-07-13 19:07

Hello,
I have the following problem. I use Gallery-Version = 2.0-beta-3+ Kern 0.9.18 and have integrated this in mambo 4.5.2.
Yesterday I tried to update to Kern 0.9.31 the upgrade process was successful but the style was terrible ;)
So I tried to integrate the mtrans theme but I get the following error when I try to enter the theme-change-site in the Site-Administration...

Fatal error: Cannot redeclare class matrixtheme in .........\gallery2\themes\mtrans\theme.inc on line 34

I think there are a lot of changes in the gallerycode and the mtrans theme is 3 month old. So I search the forum and find someone with the same error, but he tried to make a new layout and theme and get the error with the layout an not with the theme. Have a look...[SOLVED] Create New Layout & Theme Problem

My question: is the anybode with the same problem or does anyone know how to solve it? :roll:

Another error that appear at the top of the site when I open the gallery in mambo...

Warning: Cannot modify header information - headers already sent in .........\mambo\index.php on line 194

Warning: Cannot modify header information - headers already sent in .........\mambo\index.php on line 195

Warning: Cannot modify header information - headers already sent in .........\mambo\index.php on line 196

Warning: Cannot modify header information - headers already sent in .........\mambo\index.php on line 197

Warning: Cannot modify header information - headers already sent in .........\mambo\index.php on line 198

At the moment I don not have such errors and the day will come, where I have to update the gallery for security reasons. So please help me and if you have any questions or information please don't hesitate to contact or ask me! :)

Gallery-Version = 2.0-beta-3+ Kern 0.9.18
PHP-Version = 5.0.4 apache2handler
Webserver = Apache/2.0.53 (Win32) mod_ssl/2.0.53 OpenSSL/0.9.7f PHP/5.0.4 mod_perl/1.999.21 Perl/v5.8.6
Datenbank = mysql 4.1.11-nt
Werkzeuge = Exif, Gd, ImageMagick, Thumbnail, Dcraw, Ffmpeg, NetPBM, ArchiveUpload
Betriebssystem = Windows NT WORKSTATION1 5.1 build 2600
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.8 ) Gecko/20050511 Firefox/1.0.4

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-07-13 22:59

1. after the upgrade, hit refresh in your browser or clear the browser cache. it shouldn't look bad.

2. old themes / layouts don't work in the new g2 (0.9.30+), the error message seems to indicate that the mtrans theme.inc should rename its class / id.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-07-13 23:02

1. after the upgrade, hit refresh in your browser or clear the browser cache. it shouldn't look bad.

2. old themes / layouts don't work in the new g2 (0.9.30+), the error message seems to indicate that the mtrans theme.inc should rename its class / id.

 
digidydave1

Joined: 2005-07-17
Posts: 1
Posted: Sun, 2005-07-17 20:39

Hello, I am having the same issue. I am using the lastest version (posted 7/17) of G2 and MSAS 4.5.2

I receive this error when accessing G2 via Mambo:

Warning: Cannot modify header information - headers already sent in W:\www\Mambo452\index.php on line 194

Warning: Cannot modify header information - headers already sent in W:\www\Mambo452\index.php on line 195

Warning: Cannot modify header information - headers already sent in W:\www\Mambo452\index.php on line 196

Warning: Cannot modify header information - headers already sent in W:\www\Mambo452\index.php on line 197

Warning: Cannot modify header information - headers already sent in W:\www\Mambo452\index.php on line 198

I see from valiant that old themes will not work with G2. Is this something that will be fixed in G2, or do we need to fix our MOS templates? i'm using the Solar Flare template as I test this out.

Also, my embedding has gone fairly smoothly except that I get a page cannot be found error if i click on "view slideshow," and when I click on one of the images, the URL to which I am taken is as if I'm in the stand-alone G2 install. I saw someone mention a similar problem earlier, but did not see a solution.

My config file:

<?php
$g2_Config['hostname'] = 'localhost';
$g2_Config['database'] = 'msas452';
$g2_Config['username'] = 'root';
$g2_Config['password'] = '';
$g2_Config['tablePrefix'] = 'g2_';
$g2_Config['columnPrefix'] = 'g_';
$g2_Config['embedPath']='/mambo452/gallery/';
$g2_Config['path']='w:/www/Mambo452/gallery/';
$g2_Config['relativeG2Path']='../gallery';
$g2_Config['loginredirect']='index.php';
$g2_Config['displaysidebar']='0';
$g2_Config['displaylogin']='0';
$g2_Config['mirrorUsers']='0';
$g2_Config['userSetup']='0';
?>

 
janetweber

Joined: 2005-06-28
Posts: 6
Posted: Mon, 2005-07-18 01:54

If anybody is interested, i re-did the mtrans theme so it works in the new beta version.

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Mon, 2005-07-18 02:40

Can you please elaborate? Which beta version? Mambo? G2?

..and what didn't work about it? I've been using it for a while just fine. :D

 
cpzhao

Joined: 2004-12-29
Posts: 14
Posted: Mon, 2005-07-18 05:56

As a user on my site suggested, I invite you guys to visit my site as a Showcase Mambo and Gallery2 Integration.

Cheers,