CMS Integration

michelv

Joined: 2005-01-20
Posts: 17
Posted: Wed, 2005-03-09 10:29

Well, I did it the hard way :(
Complete new reinstall. Figured out that there are some cache files in the data dir that interact with update or install of a new version. So needed to create a new data dir.
That solved it.

Is there a way to clear caches withing Gallery2? I cannot delete them from my server, because that sets the data dir to owner www-data...

Anyways... I love the module. It is really just what I need, hope more people will test and use it! We could do some advertisement in Xaraya. I could submit the module overview as a doc?

Michel

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-03-09 11:04

good to hear! thank you for testing :)

I will announce the module when the time has come ;) want a little more testing and i know that some things will change in G2 related to short urls in the very near future.

deleting caches in g2:
browse to yourgalleryurl/lib/tools/test/
hit flushcache, flushtemplates
but that doesn't empty g2data or just some caches that speed up G2 but also cause some errors due to dirty caches / missed write backs etc.

if you want to empty a g2data directory (and lose all your G2 data) and you have no shell root access and if the dirs/files are owned by the webserver user, then...
create a php script test.php
<?php
exec('rm -rf /path/to/your/g2data/*',$ret);
?>
i assumed g2data itself is owned by your account. so once g2data is empty, you can reuse it for a new g2 install or delete it via ftp.
don't forget to delete such a script afterwoods from your server !!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-03-09 11:05

maybe I should explicitely delete the cached entities etc. during the synchronization, that may have fixed your problem. i'll experiment a little.

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Wed, 2005-03-09 11:44

ok, thanks for the delete script. That helped ;) Pretty dangerous thing...

Thanks for all your work!

Michel

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-03-10 11:03

elarkin, thanks for access. i suspect it was the same issue as with michelv. i made a clean install and it works now on your webhost.
hope a small change i introduced today will fix this in future.

 
elarkin

Joined: 2005-02-08
Posts: 18
Posted: Thu, 2005-03-10 20:04

everything is working 100% now even the Fput and fget errors are now gone

Thank you soooo very much Valiant!

 
elarkin

Joined: 2005-02-08
Posts: 18
Posted: Fri, 2005-03-11 00:12

Bad news...

Everything was working perfectly until I had my wife create a new account in Xaraya she then logged in and everything seemed to be ok except when she clicked on the Photo Gallery link she was sent directly to the main.php of gallery2 and gallery 2 without Xaraya wrapped around it gave her an error.

I went into the admin section and tried to sync up the users for xaraya and G2 and I got this:

System Error
Exception Icon
Function failed

Failed to update G2 user with extId [9]. Here is the error message from G2: <br /> [<div>
<span>
<b>
Error (ERROR_MISSING_OBJECT): Missing object for 12
</b>
</span>
<ul>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage/DatabaseStorage.class">
modules/core/classes/GalleryStorage/DatabaseStorage.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage/DatabaseStorage.class&amp;g2_line=1960#1960">
1960
</a>

(gallerystatus::error)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage/DatabaseStorage.class">
modules/core/classes/GalleryStorage/DatabaseStorage.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage/DatabaseStorage.class&amp;g2_line=304#304">
304
</a>

(mysqldatabasestorage::_identifyentities)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage.class">
modules/core/classes/GalleryStorage.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage.class&amp;g2_line=113#113">
113
</a>

(mysqldatabasestorage::loadentities)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/helpers/GalleryEntityHelper_simple.class">
modules/core/classes/helpers/GalleryEntityHelper_simple.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/helpers/GalleryEntityHelper_simple.class&amp;g2_line=82#82">
82
</a>

(gallerystorage::loadentities)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/helpers/GalleryEntityHelper_simple.class">
modules/core/classes/helpers/GalleryEntityHelper_simple.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/helpers/GalleryEntityHelper_simple.class&amp;g2_line=141#141">
141
</a>

(galleryentityhelper_simple::loadentitiesbyid)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryCoreApi.class">
modules/core/classes/GalleryCoreApi.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryCoreApi.class&amp;g2_line=2094#2094">
2094
</a>

(galleryentityhelper_simple::loadentitybyexternalid)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=embed.php">
embed.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=embed.php&amp;g2_line=289#289">
289
</a>

(gallerycoreapi::loadentitybyexternalid)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php">
/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php&amp;g2_line=346#346">
346
</a>

(galleryembed::updateuser)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php">
/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php&amp;g2_line=1556#1556">
1556
</a>

(xargallery2helper::g2updateuser)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xaradmin/updateconfig.php">
/home/x67wgra/public_html/modules/gallery2/xaradmin/updateconfig.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xaradmin/updateconfig.php&amp;g2_line=82#82">
82
</a>

(xargallery2helper::g2xarusergroupimportexport)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/includes/xarMod.php">
/home/x67wgra/public_html/includes/xarMod.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/includes/xarMod.php&amp;g2_line=871#871">
871
</a>

</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/index.php">
/home/x67wgra/public_html/index.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/index.php&amp;g2_line=85#85">
85
</a>

</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/index.php">
/home/x67wgra/public_html/index.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/index.php&amp;g2_line=153#153">
153
</a>

</li>
</ul>
</div>]
Explanation:

The function executed correctly, but the result was a failure.
Stack:

at g2updateuser(xargallery2helper.php:349)
at g2xarusergroupimportexport(xargallery2helper.php:1556)

Array
(
[0] => 2
[1] => FUNCTION_FAILED
[2] => systemexception Object
(
[msg] => Failed to update G2 user with extId [9]. Here is the error message from G2: <br /> [<div>
<span>
<b>
Error (ERROR_MISSING_OBJECT): Missing object for 12
</b>
</span>
<ul>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage/DatabaseStorage.class">
modules/core/classes/GalleryStorage/DatabaseStorage.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage/DatabaseStorage.class&amp;g2_line=1960#1960">
1960
</a>

(gallerystatus::error)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage/DatabaseStorage.class">
modules/core/classes/GalleryStorage/DatabaseStorage.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage/DatabaseStorage.class&amp;g2_line=304#304">
304
</a>

(mysqldatabasestorage::_identifyentities)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage.class">
modules/core/classes/GalleryStorage.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryStorage.class&amp;g2_line=113#113">
113
</a>

(mysqldatabasestorage::loadentities)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/helpers/GalleryEntityHelper_simple.class">
modules/core/classes/helpers/GalleryEntityHelper_simple.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/helpers/GalleryEntityHelper_simple.class&amp;g2_line=82#82">
82
</a>

(gallerystorage::loadentities)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/helpers/GalleryEntityHelper_simple.class">
modules/core/classes/helpers/GalleryEntityHelper_simple.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/helpers/GalleryEntityHelper_simple.class&amp;g2_line=141#141">
141
</a>

(galleryentityhelper_simple::loadentitiesbyid)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryCoreApi.class">
modules/core/classes/GalleryCoreApi.class
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=modules/core/classes/GalleryCoreApi.class&amp;g2_line=2094#2094">
2094
</a>

(galleryentityhelper_simple::loadentitybyexternalid)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=embed.php">
embed.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=embed.php&amp;g2_line=289#289">
289
</a>

(gallerycoreapi::loadentitybyexternalid)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php">
/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php&amp;g2_line=346#346">
346
</a>

(galleryembed::updateuser)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php">
/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xargallery2helper.php&amp;g2_line=1556#1556">
1556
</a>

(xargallery2helper::g2updateuser)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xaradmin/updateconfig.php">
/home/x67wgra/public_html/modules/gallery2/xaradmin/updateconfig.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/modules/gallery2/xaradmin/updateconfig.php&amp;g2_line=82#82">
82
</a>

(xargallery2helper::g2xarusergroupimportexport)
</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/includes/xarMod.php">
/home/x67wgra/public_html/includes/xarMod.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/includes/xarMod.php&amp;g2_line=871#871">
871
</a>

</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/index.php">
/home/x67wgra/public_html/index.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/index.php&amp;g2_line=85#85">
85
</a>

</li>
<li>
<b>
in file
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/index.php">
/home/x67wgra/public_html/index.php
</a>
<b>
at line
</b>
<a href="http://www.367wgrantst.net/index.php?module=gallery2&amp;g2_view=debug:FileViewer&amp;g2_file=/home/x67wgra/public_html/index.php&amp;g2_line=153#153">
153
</a>

</li>
</ul>
</div>]
[id] => 0
[major] => 0
[defaults] =>
[title] =>
[short] =>
[long] =>
[hint] =>
[stack] => Array
(
)

[product] =>
[component] =>
[module] => gallery2
)

)

at gallery2_admin_updateconfig(updateconfig.php:82)

Array
(
[0] => 9
[1] => Array
(
[uid] => 9
[uname] => Valiant
[name] => Valiant
[email] =>

[pass] => 0ac1ce9ac00969bdd395f3ec4c00aca1
[state] => 3
[date_reg] => 1110424527
)

)

at xarmodfunc(xarMod.php:871)
at xarmain(index.php:85)

Click here to raise a bug

now when I click on my gallery link it tells me its not configured and I can not get passed this error above to get the module reinstalled.

Ed

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-03-11 07:52

elarkin, thanks for the report.
Xaraya is in development too and their roles module is quite important to the G2 integration. All this worked 1,2 months ago but ever since, i didn't test all functionality of the integration again, sorry.
I will look into this tonight.

 
elarkin

Joined: 2005-02-08
Posts: 18
Posted: Fri, 2005-03-11 13:51

Valiant,

No need to apologize to me, you are the one doing all the hard work, I appreciate what you and every other developer does.

I wish I could help more.

If you need access to my site again Ill be more than willing to grant that access BUT only for you to test the application I would preffer to set up all my applications myself as I would feel like a leech if you were to set up my gallery again.

thanks again,
Ed

 
elarkin

Joined: 2005-02-08
Posts: 18
Posted: Fri, 2005-03-11 14:20

Ok managed to fix the above mentioned problem.
Notice in the error message it has you (valiant) listed as the user? Im not sure why this happened but I deleted your account after you had come in and set up the gallery and it was working, After I deleted your account in xaraya I started having this problem. When I tried to recreate your account it told me you were already in the database as a user even after I had deleted your user name.

I manually deleted your account form mysql and then recreated your account through xaraya and then was able to get Modules ==> Gallery2 ==> Modify Config to work correctly

Now im back to this error and think I just need to reinstall gallery:

The following lines were printed in raw mode by module, however this should not happen. The module is probably directly calling functions like echo, print, or printf. Please modify the module to exclude direct output. The module is violating Xaraya architecture principles.

this is due to header already being sent error coming from gallery2.
hope some of this helps

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-03-11 18:12

Ah, you deleted an account in xaraya. Please inform me on all such events when reporting an error. As you can read in the bugs/known issues section of the readme, user deletion isn't supported ATM, because of a unfixed xaraya bug. the xaraya developers promised me to fix the user deletion bug before xaraya 1.0, it's in the 1.0 blocker list.

I'll see if i can handle this more gracefully until xaraya is ready and if other bugs on my part are involved.

 
valiant

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

New xaraya integration available, but I didn't increase the version number.

Quote:
- Included note that G2 short urls are no longer supported when embedded xaraya, while xaraya short urls are still supported.
- Fixed a bug in the verifyConfig code.
- Fixed a bug in the delete user synchronization code.
- Requires now G2 0.9.2.
- Now deleting users/groups in xaraya is synchronized to G2, but purging users/groups is still not supported and will lead to inconsistent data between G2 and xaraya, due to a xaraya bug.
- Updated Readme/admin-main view

elarkin, get the newest integration code. remove the gallery2 module in the xaraya modules admin view. delete all entries in your G2 db externalIdMap table. delete the valiant user in G2 db g2_users table. install/activate the gallery2 xaraya module.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-03-21 10:38

xaraya integration, small update:
- xaraya Delete/Purge/Recall role is now synchronized to G2.
- i introduced a CHANGELOG, all you see there for now is the change from the last state to this version, so just this delete/purge/recall thing.

btw: the new version will only work with xaraya bk version from today, 2005/03/21, or newer. i.e. if you use the new integration module with an old xaraya version and you delete/purge/recall a role in xaraya, you'll get errors and the user base of G2 and xaraya will be out of sync afterwards.

 
New10

Joined: 2005-04-07
Posts: 12
Posted: Fri, 2005-04-08 22:12

Community Builder 1.0 beta 4 for Mambo, at mambojoe.com, may be worth a look. I would love to see Gallery work with Mambo/Community Builder.

 
valiant

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

find a guy that knows mambo/community builder whatever and we will guide him if he has questions. G2 is ready for integration. there's even a mambo integration for G2, not finished, but it's working. all you need is a guy that finishes the job.

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Wed, 2005-06-22 09:41

New10,

What do you mean by Community Builder integration?

thxs,
Michiel

 
mi1stormilst

Joined: 2004-02-12
Posts: 12
Posted: Fri, 2005-09-09 19:54

Can any one point me in the right direction for embedding G2 into SubDreamer? I have resorted to begging...

http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=35703

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-09-09 20:59

mi1stormilst, same directions for you as for everyone who asks.
please look at docs/EMBEDDING, the code of the existing integrations and try to mimic as much as possible.
and no, i have no time at all, live has never been busier. plus, i'd suggest either offering a full payed job or no money at all. if there's no money, then there's true motivation.
if there is money involved, it changes things.