CMS Integration

valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2004-12-30 16:50

Danny, the error from yesterday (navigationLocale) is fixed in my dev version (not online, because I'm working on the search hook too).
I'll investigate in the _done() call, thanks.
btw: do I have to activate this logging functionality in xaraya because, my var/log/ folder is still empty... (or just chmod it to writable?)?

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Thu, 2004-12-30 18:04

Valiant, thanks for your help. I test your new version as soon as it is out.

About logging. The directory var/logs must be writable and a file called log.txt (also writable) must be present.

When you have the LogConfig Module installed, you can finetune the logger options, what is being logged.

Danny

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Sat, 2005-01-01 23:28

Valiant, I started a Bug Report about Xaraya behaviour with the Gallery2 Modul under

http://bugs.xaraya.com/show_bug.cgi?id=3834

It would be good, if you have a look at the Bug and give your expertise.

Thanks,

Danny

 
valiant

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

mindless, somethings that all integrations still need:

- solution for css interferences: put G2 html in a container (<div>) or something and the css experts should identify everything so that nothing outside this container gets affected by G2 css
see this site as an example (not mine):
http://dugas.homeip.net/index.php?module=gallery2&g2_view=core:ShowItem&g2_itemId=8

- menu links method (spiderr could work on this)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-01-09 05:41

the container div (id="gallery") already exists.. the css just doesn't use it. I agree it should.

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Mon, 2005-01-10 18:13

Thanks for the new release. The errors where gone. It will be good, if there is an option to disable the description title like "Random Image" or "Most viewed pictures". It would be good, if there is an config option, to center the pictures in the image block "Random Image" or "Most viewed Image".

Danny

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-01-10 18:28

Danny, AFAIK there's an option to disable the title in the image block "heading" or something like that in the instance config.

mindless, I guess I need the image block without precompiled HTML, just the vars: thumb download url, fullsize download url, fullsize showitem url, titile, date, ... = unrendered imageblock.
i didn't check if it's already possible, is it?

thanks - Andy

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Mon, 2005-01-10 20:45

Valiant, yes under Blocks->Show Instances->Image Block is a checkbox to disable the Heading. But with my Xaraya Installation it is not working. Whenever I disable Heading and press "Update Config" nothing changes in my Image Block and also "Heading" is activated. Very strange. Is it working in your installation?

I use your Gallery2 Module which you released 09.1.2005.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-01-10 20:53

Danny, very probably my fault, gonna correct it when i'm at home.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-01-10 23:42

Danny, fixed.

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Tue, 2005-01-11 20:04

Thousand thanks, it works!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-01-16 23:03

i committed the xaraya integration to the G2 cvs and fixed the "public site" bug. It should work now with all kinds of xaraya sites.

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Thu, 2005-01-20 09:07

Hey,

I love your work here. When I try to install your Gallery2 module in Xaraya 0.9.11 I get the error indicating I need to update Gallery to version .8.8 (now .8.6).

So my question is:
What are the requirements now for the module? Should I use the CVS version of Gallery 2, which version of Xaraya do you require?

Keep the good work up!
Michel

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-01-20 10:29

michelv, xaraya 0.9.11, G2 current cvs (.8.8).
using the cvs version of my module is a good thing.
I'll add the requirements in the readme, sorry.

 
DrBob
DrBob's picture

Joined: 2005-01-09
Posts: 20
Posted: Fri, 2005-01-21 10:39

Just a small question: I know you are all mainly busy with integration in xaraya but do you know if any work has been done/started to integrate G2 into Mambo ?

I'm really in a desperate need of this integration (even if G2 is still in alpha). I know some posts were done on the Mambo forum asking for developers but it seems nobody replied. (If I had any notion of PHP, I would gladly start coding myself).

Kind regards,
DrBob

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-01-21 15:43

DrBob, AFAIK there has been zero progress concerning a mambo integration, sorry. And we don't have any mambo knowledge or the time to start another integration at the moment. You'll have to find someone who does the work for you.

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Mon, 2005-01-24 11:14

I have Gallery CVS now integrated into Xaraya .9.11. I have coupled some dynamic data to the roles module.. so when adding a user he has some dynamic data.

When adding a user it all works great.

When deleting him then I get:

Failed to change G2 password to a random password during xaraya delete role process of role with extId [13]!
Explanation:

De functie is correct uitgevoerd, maar het resultaat is mislukt. (=function worked, but result failed)
Stack:

at _gallery2_adminapi_deleterolehook(deletehook.php:115)
at gallery2_adminapi_deletehook(deletehook.php:34)

If you want I can mail the complete error.

Michel

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-01-24 16:07

deletion of users is still experimental due to xaraya incompatiblity.
but i'll look into it.

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Fri, 2005-02-11 17:55

I have three new methods on my desktop for proposal to embed.php.

- getSyncMap(), Get map for syncing by mapping type.
In the xaraya code both types are readed at once. That's not a good solution where you do syncing for such users that do overlap. You have old data in the arrays after the database is updated by g2addexternalMapEntry. The method is a bit modified from the xaraya code.

- addSyncMapEntry(), Adds an entry for the map used for syncing.
Also from xaraya code.

- setProperty(), Set property for configure the way integration/embedding is done.
A delegate method for GalleryCapabilities::set(). I think it's easiest if integrations can consentrate only on one object GalleryEmbed for all the integration needs.

How about testacases. Does GalleryEmbed has it's own?

The code. I haven't tested it even yet. What do you think?

  /**
   * Get map for syncing by mapping type.
   *
   * @param string the id ('entityId' or 'externalId') used as key for the returned array 
   * @return array(object GallerySuccess, array(Id => array(externalId => integer,
   *                             entityId => integer, entityType => string)))
   */
  function getSyncMap($key)
  {
    $query = 'SELECT [ExternalIdMap::entityId], [ExternalIdMap::externalId], [ExternalIdMap::entityType]
		FROM [ExternalIdMap]';
    
    list ($ret, $results) = $gallery->search($query, array());
    if ($ret->isError()) {
      return array($ret->wrap(__FILE__, __LINE__), null);
    }
    $map = array();
    while ($result = $results->nextResult()) {
        $entry = array('externalId' => $result[1], 'entityId' => $result[0], 'entityType' => $result[2]);
        if ($type == 'externalId') {
	    	$map[$result[0]] = $entry;
	    } else if ($type == 'entityId') {
		    $map[$result[1]] = $entry;
		}
    }
    return array(GalleryStatus::success(), $map); 	
  }	  
  
  /**
   * Adds an entry for the map used for syncing.
   *
   * @access public
   * @param integer the externalId
   * @param integer the entityId
   * @param string the roles type, 'GalleryGroup' for groups, 'GalleryUser' for users
   * @return object GalleryStatus
   */
  function addSyncMapEntry($externalId, $entityId, $entityType)
  {
    $ret = ExternalIdMap::addMapEntry(array('externalId' => $externalId, 'entityType' => $entityType, 'entityId' => $entityId));
    if ($ret->isError()) {
      return array($ret->wrap(__FILE__, __LINE__), null);
    }
    return GalleryStatus::success();
  }
  
  /**
   * Set property for configure the way integration/embedding is done.
   * Valid keys are: showSidebar, showPathbar
   *
   * @access public
   * @param the key for the property
   * @param the value for the property
   * @return object GalleryStatus
   */
  function setProperty($key, $value)
  {
    $ret = GalleryCapabilities::set($key, $value);
    if ($ret->isError()) {
      return array($ret->wrap(__FILE__, __LINE__), null);
    }
    return GalleryStatus::success();
  }
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-02-11 18:10

While i agree in principle to add methods similar to the first two functions, I''m not sure what you gain with the 3rd function.
Instead of $ret = GalleryCapabilities::set($key, $value); you'll have to write $ret = GalleryEmbed::setProperty($key, $value); . Even the error handling is the same.

@the sync map methods:
Basically, what I did in the xaraya integration isn't very G2-like. I used my own SQL because G2 doesn't offer methods for these actions. I agree that we need to add them somewhere. But I have to revisit my xaraya code if the above functions are optimal.

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Fri, 2005-02-11 18:41
valiant wrote:
I''m not sure what you gain with the 3rd function.
Instead of $ret = GalleryCapabilities::set($key, $value); you'll have to write $ret = GalleryEmbed::setProperty($key, $value); . Even the error handling is the same.

Only for collecting all embedding methods in one place.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-02-13 18:21

@ function addSyncMapEntry:
- I'd call it: "addExternalIdMapEntry". Because externald is an official G2 term and "Sync" isn't used anywhere else.

- Are you sure that it works without including the ExternalIdMap.class before?
I'm quite sure that I tried it first without, got an error and then included the class by
require_once(xarModGetVar('gallery2','g2.includepath') . '/modules/core/classes/ExternalIdMap.class');

- Using "GalleryGroup" and "GalleryUser" instead of 1 and 0 makes good sense

@ function getSyncMap:
- again, i'd prefer "getExternalIdMap" as function name

- could you elaborate why returning one map is better than both maps? In what specific case? I mean, if the mapping is obsolete due to modifications as addexternalidmap, both arrays will be obsolete and need to be updated. so why does it matter if you return the map sorted by externalId and entityId instead of only one of them?

- this functions needs to be in embed.php, i absolutely agree

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-02-14 13:34

good news on the xaraya front. the status of xaraya bug 3535 has been changed to a xaraya 1.0 blocker. that means that i get my delete/create events (hooks) in xaraya, when a user/group gets deleted/purged/recalled.

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Mon, 2005-02-14 14:10
valiant wrote:
- Are you sure that it works without including the ExternalIdMap.class before?

I hadn't even tested the code ... I prefer solving the problems on a theoretical level before I start debugging. I usually write for many days code without testing it. ;)

valiant wrote:
- could you elaborate why returning one map is better than both maps? In what specific case? I mean, if the mapping is obsolete due to modifications as addexternalidmap, both arrays will be obsolete and need to be updated. so why does it matter if you return the map sorted by externalId and entityId instead of only one of them?

You have a two sets of users. The intersection of the two sets are users that are registerd into both EmApp and G2.

Now you iterate through G2 users. Update the set of intersection users that are known in both G2 and EmApp. You update the ExternalMap to flag that this is done.

Later you iterate through EmApp users ... you handle only those that are not in the the ExternalMap. Otherwise the set of intersection users will be synced twice.

Between these two iterations you have to read the ExternalMap again to be able to handle these intersection users.

Is the explanition enough? I can do it purely mathematicly if you want ;)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-02-14 14:56

EmAppUsers = {List of EmApp Users}
G2Users = {List of G2 Users}
Map = {List of mapped/sync'ed Users}

These lists are stored in the databases.
Cached Lists = arrays / hashes / ..., are images of the lists created one point in time and are not up to date.

Algorithm:

(01) Get cached Lists of EmAppUsers, G2Users and Map denoted as EmAppUsers_cache, G2Users_cache and Map_cache respectively;
(02) For each g2User in G2Users_cache do
(03)     if g2User NOT in Map_cache then
(04)         Create User in EmApp with user data from g2User;
(05)         Insert new mapping into Map;
(06)         Insert new mapping into Map_cache;
(07)     end if;
(08) end for;
(09) For each emAppUser in EmAppUsers_cache do
(10)     if emAppUser NOT in Map_cache then
(11)         Create User in G2 with user data from emAppUser;
(12)         Insert new mapping into Map;
(13)     else
(14)         Update User in G2 with user data from emAppUser;
(15)     end if;
(16) end for;

My point is as follows:
The cached Lists, especially the Map, needs either a refresh/update between line (8) and (9) of the code or as I did it here, it gets updated on each insert.
The point in having Map_cache organized by externalId AND by entityId is that in (3) and (10), we need a different structure of this Map list.

Note: (11) and (12) can be done with a single method call from GalleryEmbed.

I still don't understand why having two copies of a cached version of Map is worse than having only one as you propose.

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Mon, 2005-02-14 15:39

Eiher way, refresh between line 8 and 9 or using a Map_cache. If you do the refresh between 8 and 9 you need only one list at a time. So you use the second map as a cache. I like your cached solution, but it's slightly complicated then a refresh.

The cached solution is faster. But you have only to do it once. So it doesn't really mater. This cache may confuse developers. Is this algorithm the way it's done in Xaraya?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-02-14 16:00

Einstein, ah I see what you mean. Right. For the first iteration only Map by entityId is needed and for the second iteration Map by externalId. Ok, then I agree with your proposal of the function, only 1 list is needed per iteration.
Here's the slightly modified algorithm, I'll add it to the docs (which don't exist at the moment)

(01) Get cached lists of EmAppUsers, G2Users and Map by entityId denoted as EmAppUsers_cache, G2Users_cache and Map_by_entityId_cache respectively;
(02) For each g2User in G2Users_cache do
(03)     if g2User NOT in Map_by_entityId_cache then
(04)         Create User in EmApp with user data from g2User;
(05)         Insert new mapping into Map;
(06)     end if;
(07) end for;
(08) Get cached list of Map by externalId Map_by_externalId_cache;
(09) For each emAppUser in EmAppUsers_cache do
(10)     if emAppUser NOT in Map_by_externalId_cache then
(11)         Create User in G2 with user data from emAppUser;
(12)         Insert new mapping into Map;
(13)     else
(14)         Update User in G2 with user data from emAppUser;
(15)     end if;
(16) end for; 

PS: This is the way I did it in xaraya. Well, I get the Map always for both both Map_caches, but basically it's the same.
Group import/export and group memberships make the whole thing bloated, plus the exceptions that have to do with group membership incompatiblities between xaraya and G2. But basically, as you see, it's straight forward and easy.

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Mon, 2005-02-14 19:55
valiant wrote:
Here's the slightly modified algorithm, I'll add it to the docs (which don't exist at the moment)

I don't get it, why you have the world cache in the latest algortihm. And secondly users in both userbases are missed? Or are they? Maybe we think a bit different ;)

I think it like this, the "phpBB" way:

(01) Get list of EmAppUsers;
(02) Get list of G2Users;

(03) Get ExternalIdMap by entityId;
(04) For each G2User in G2Users do
(05)     if G2User NOT in ExternalIdMap then
(06)         if G2User NOT in EmAppUsers  then
(07)             Create User in EmApp with user data from G2User;
(08)         else
(09)             Add EmAppUser to array of conflicts;
(10)         end if;
(11)         Insert new mapping into ExternalIdMap;
(12)     end if;
(13) end for;

(14) Get new ExternalIdMap by externalId;
(15) For each EmAppUser in EmAppUsers do
(16)     if EmAppUser NOT in ExternalIdMap then
(17)         Create User in G2 with user data from EmAppUser;
(18)         Insert new mapping into ExternalIdMap;
(19)     end if;
(20) end for; 
 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Mon, 2005-02-14 20:08

Want to add that a conflict is where username same but password differ.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-02-14 20:29
Quote:
I don't get it, why you have the world cache in the latest algortihm.

At the very moment you query the db and put the result into an array in php, you acquired a cached state of the database. that's why i use the word cache. from the Level 1 cache, RAM, harddisk point of view, it's the same thing as a cache.

Quote:
And secondly users in both userbases are missed? Or are they? Maybe we think a bit different.

No, they are not. I didn't write the "conflicts" and all the various checks in the very rough code above, but you can easily add them. In my xaraya code, i handle "conflicts" immediately and don't push them on a conflicts list. I state very clearly what I do in the import/export code in my xaraya admin page. That conflicts are handled in a specific way.
I considered generating a list of all conflicting users and presenting this in a HTML form to the admin so that he could choose what to do on a user per user basis. But I thought it wasn't worth the pain.

Quote:
Want to add that a conflict is where username same but password differ.

Well, what I do is in line (14) of my code. Passwords in G2 get overwritten with the passwords from EmApp.

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Mon, 2005-02-14 20:55
valiant wrote:
Quote:
Want to add that a conflict is where username same but password differ.

Well, what I do is in line (14) of my code. Passwords in G2 get overwritten with the passwords from EmApp.

That's the scary thing ... usernames can be hijacked. Let's say you have SuperG2User in Gallery. For hijacking you register SuperG2User into EmApp. After the sync the second user have control over the first users Gallery information.

I finally undertood your algorithm the "right way". It's not possible to do it your way by overwriting passwords, if you want to solve the conflicts.

I leave the conflicts unmapped. After that you can run the sync again to get everything in order.

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Mon, 2005-02-14 21:08

Can you commit those methods to CVS?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-02-17 09:50

And your explanation why my way of resolving "conflicts" is incorrect is the "Superg2User" example? You can't call that hijacking. You know what happens during synchronization, you are in control of both applications. Just prepare the applications before the initial synchronzation.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-02-17 15:36

I added the two externalIdMap methods to GalleryEmbed.
I didn't add setCapability because it would be the only method that doesn't simplify anything. And there plenty of other functions that can / will be used in a integration and it doesn't make sense to put a copy of x% of the G2 API into GalleryEmbed, does it?

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Thu, 2005-02-17 18:57
valiant wrote:
And your explanation why my way of resolving "conflicts" is incorrect is the "Superg2User" example? You can't call that hijacking. You know what happens during synchronization, you are in control of both applications. Just prepare the applications before the initial synchronzation.

But how do you know that a user with same username is the really the same user without checking the password? You don't know.

Say we have two users ... both use username bill. The first one has a username only to gallery. The second bill has only a username to EmApp. With your way the "gallery bill" cannot get into your system anymore.

Your way isn't incorrect .. but it can cause username problems if you integrate big userbases.

valiant wrote:
I added the two externalIdMap methods to GalleryEmbed.
I didn't add setCapability because it would be the only method that doesn't simplify anything. And there plenty of other functions that can / will be used in a integration and it doesn't make sense to put a copy of x% of the G2 API into GalleryEmbed, does it?

That's OK ... but it's good to ducument what other objects can be of use in i integration.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-02-17 23:16

Einstein, i clearly declare that the initial mapping is based on user/group names. what else should be the map based on? we could feature a "conflicting users" page, true. but once the initial mapping process starts, the admin knows what is gonna happen, no surprises.
i acknoledge that it would be better, if there was an additional page for conflicting users. but it 'd be just a "goody".

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Sun, 2005-03-06 15:00

Hey,

I have Xaraya snap 050220 running with the CVS version of Gallery 2 and the integration module.
Install works fine, but when I go to configure the module there are some problems:

First, the config says:
Status of the Gallery2 module: The current configuration could not be verified successfully. Here is the error message:
[roles module was not hooked to our gallery2 module, but that is fixed now.]

I already did the hooks, before going to the gallery config, so why this message? At some times, this message is skipped.

Then, trying to synch the roles/users, I get:

Functie ontbreekt. (Function missing)

Failed to update special G2 group by extId [5]. Here is the error message from G2: <br /> [Error (GALLERY_SUCCESS)<UL><LI><B>in</B> <B>at line</B> 0</UL>]
Explanation:

De functie is correct uitgevoerd, maar het resultaat is mislukt. (result failed)
Stack:

at g2updatespecialroles(xargallery2helper.php:1181)
at g2xarusergroupimportexport(xargallery2helper.php:1262)

Array
(
[0] => 2
[1] => FUNCTION_FAILED
[2] => systemexception Object
(
[msg] => Failed to update special G2 group by extId [5]. Here is the error message from G2: <br /> [Error (GALLERY_SUCCESS)<UL><LI><B>in</B> <B>at line</B> 0</UL>]
[id] => 0
[major] => 0
[defaults] =>
[title] =>
[short] =>
[long] =>
[hint] =>
[stack] => Array
(
)

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

)

at gallery2_admin_updateconfig(updateconfig.php:82)
at xarmodfunc(xarMod.php:871)
at xarmain(index.php:91)

Any idea where I should look to get it working again?

Michel

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-03-06 15:14

versions:
the integration module is also from current cvs?

Quote:
First, the config says:
Status of the Gallery2 module: The current configuration could not be verified successfully. Here is the error message:
[roles module was not hooked to our gallery2 module, but that is fixed now.]

I already did the hooks, before going to the gallery config, so why this message? At some times, this message is skipped.

Maybe you didn't hook everything. Don't know. Checking it later.

Quote:
Failed to update special G2 group by extId [5]. Here is the error message from G2: <br /> [Error (GALLERY_SUCCESS)<UL><LI><B>in</B> <B>at line</B> 0</UL>]

I have to investigate in this. I had something similar, thought it was related to postgres. Well, obviously it's not. What fixed it for me was to a) retry or b) delete all entries in db table g2_externalIdmap and retry.

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Sun, 2005-03-06 16:06

Versions are all latest CVS, or maybe a few days older. I am noticing that Xaraya is getting stricter in dealing with all kinds of variables. In between 9.11 and now some things 'break'.

I will try you suggestion of deleting g2_externalIdmap-entries

Hooks: the readme says only roles is needed. I also hooked dynamic data, but that didn't solve anything.

Thanks,
Michel

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-03-06 16:17

You don't need to hook anything manually, the admin->modify config view handles these things.

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Sun, 2005-03-06 16:28

Deleted the entries in g2_externalIdmap, hit the button, received this error:

Functie ontbreekt.

Could not get extId for g2groupid [1].
Explanation:

De functie is correct uitgevoerd, maar het resultaat is mislukt.
Stack:

at g2xarusergroupimportexport(xargallery2helper.php:1500)
at gallery2_admin_updateconfig(updateconfig.php:82)

Array
(
[0] => 2
[1] => FUNCTION_FAILED
[2] => systemexception Object
(
[msg] => Could not get extId for g2groupid [1].
[id] => 0
[major] => 0
[defaults] =>
[title] =>
[short] =>
[long] =>
[hint] =>
[stack] => Array
(
)

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

)

at xarmodfunc(xarMod.php:871)
at xarmain(index.php:91)
____
Retry:
____

Functie ontbreekt.

Failed to create a extmap entry for role uid [24] and entityId [1], entityType [GalleryGroup]. Here is the error message from G2: <br />
[Error (ERROR_STORAGE_FAILURE)<UL><LI><B>in</B> modules/core/classes/GalleryStorage/DatabaseStorage.class <B>at line</B> 1208 (gallerystatus::error) <LI><B>in</B> modules/core/classes/GalleryStorage.class <B>at line</B> 261 (mysqldatabasestorage::addmapentry) <LI><B>in</B> modules/core/classes/interfaces/ExternalIdMap.inc <B>at line</B> 96 (gallerystorage::addmapentry) <LI><B>in</B> embed.php <B>at line</B> 766 (externalidmap::addmapentry) <LI><B>in</B> /home/sensor/www/modules/gallery2/xargallery2helper.php <B>at line</B> 585 (galleryembed::addexternalidmapentry) <LI><B>in</B> /home/sensor/www/modules/gallery2/xargallery2helper.php <B>at line</B> 1367 (xargallery2helper::g2addexternalmapentry) <LI><B>in</B> /home/sensor/www/modules/gallery2/xaradmin/updateconfig.php <B>at line</B> 82 (xargallery2helper::g2xarusergroupimportexport) <LI><B>in</B> /home/sensor/www/includes/xarMod.php <B>at line</B> 871<LI><B>in</B> /home/sensor/www/index.php <B>at line</B> 91<LI><B>in</B> /home/sensor/www/index.php <B>at line</B> 159</UL>]
Explanation:

De functie is correct uitgevoerd, maar het resultaat is mislukt.
Stack:

at g2addexternalmapentry(xargallery2helper.php:590)
at g2xarusergroupimportexport(xargallery2helper.php:1367)

Array
(
[0] => 2
[1] => FUNCTION_FAILED
[2] => systemexception Object
(
[msg] => <DELETED>
[id] => 0
[major] => 0
[defaults] =>
[title] =>
[short] =>
[long] =>
[hint] =>
[stack] => Array
(
)

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

)

at gallery2_admin_updateconfig(updateconfig.php:82)

Array
(
[0] => 24
[1] => 1
[2] => 1
)

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

The Gallery groups are updated, the gallery users not.

Michel

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-03-06 16:34

after deletin the entries in g2_externalidmap, you have to resynchronize xaraya/g2 user/groups in xaraya admin menu->gallery2->modify config import tab.

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Sun, 2005-03-06 17:43

Yes, the error is when I hit the sync button. So the synchronizing causes the error.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-03-07 18:05

@hooks:
let my module do the hooking, it does it automatically. Don't change it. And if you do, go to xaraya admin menu -> gallery2 -> modify config. it should correct it automatically, if you screwed something up.

@versions:
i've just installed G2/xaraya successfully. Using G2 / gallery2 integration both from cvs and xaraya snapshot from 02.26.
-> Couldn't reproduce the bug.

Please get the newest versions of everything and try again, thank you.

 
elarkin

Joined: 2005-02-08
Posts: 18
Posted: Tue, 2005-03-08 00:33

Valiant,

Awsome work so far.

Not sure if its me or not but I am having the same problem as above, I did figure out to comment out the G2 version section and did get modify config to work but when I synced users I got a ton of errors and gallery was no longer working.

I use the current zip files of Xaraya and G2 and cvs'ed your integration into xaraya just yesterday, I do think I know what the problem is, I actually deleted the table and not the entries in it. this casued me to have to reinstall all of the G2.

I re ran the module setup and then ran the sync users and get the same error, its the usergroup function that I am having problems with.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-03-08 07:36

elarkin, if you can give me access to your machine, i may be able to reproduce the bug and fix it. You pm / email me all usernames/passwords I need and tell me how much i'm allowed to delete (g2, xaraya).

ps: the version check bug is fixed since 12+ hours. the anonymous cvs version is often very late, i.e. if i change something in cvs, you have to wait hours, maybe days to see the change in anonymous cvs.

i just checked the anonymous cvs version of the integration module, it's up to date. please download it, the version check works fine now. and if you encounter errors during activation, please a) report the errors and b) let me access your box.

thanks

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Wed, 2005-03-09 07:47

Just to let you know:
After upgrading gallery2 to version 9 and updating the integration module to latest CVS, I still get the same error:

Failed to create a extmap entry for role uid [24] and entityId [1], entityType [GalleryGroup]. Here is the error message from G2: <br />
[Error (ERROR_STORAGE_FAILURE)<UL><LI><B>in</B> modules/core/classes/GalleryStorage/DatabaseStorage.class <B>at line</B> 1204 (gallerystatus::error) <LI><B>in</B> modules/core/classes/GalleryStorage.class <B>at line</B> 261 (mysqldatabasestorage::addmapentry) <LI><B>in</B> modules/core/classes/interfaces/ExternalIdMap.inc <B>at line</B> 96 (gallerystorage::addmapentry) <LI><B>in</B> embed.php <B>at line</B> 766 (externalidmap::addmapentry) <LI><B>in</B> www/modules/gallery2/xargallery2helper.php <B>at line</B> 585 (galleryembed::addexternalidmapentry) <LI><B>in</B> /www/modules/gallery2/xargallery2helper.php <B>at line</B> 1369 (xargallery2helper::g2addexternalmapentry) <LI><B>in</B> /www/modules/gallery2/xaradmin/updateconfig.php <B>at line</B> 82 (xargallery2helper::g2xarusergroupimportexport) <LI><B>in</B> /www/includes/xarMod.php <B>at line</B> 871<LI><B>in</B> /www/index.php <B>at line</B> 91<LI><B>in</B> /www/index.php <B>at line</B> 159</UL>]

I have to think about you accessing my box... are we the only ones with this problem?
Maybe easier to do a new install...

Michel

 
valiant

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

michelv, my xaraya gallery2 module isn't official yet so there are not that many users. and you two are the only ones who have this error, probably because you are the only ones who installed it lately.
I don't get this kind of error on my server, so I don't know why / what goes wrong. Finding a bug without the seeing the consequences needs a lot of time, much more than you see what's going wrong while debugging it.
so yes, i need access to either your or elarkins server.

 
michelv

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

mm, I cannot install the latest CVS of Gallery2. Version error. I'll try with the beta release.

Michel

 
valiant

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

version error during install / modify config of the gallery2 module in xaraya?
then you have not the newest gallery2 module for xaraya.