yet another - can't get XP Publish to work

ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 17:15

I have read every post here and nothing has helped.


Gallery version: 2.0.2
PHP: 4.3.3
Apache: 2.0.53
MySQL: 2.5.4
OS: MS 2003 Server
Activated toolkits: GD
Browser: FF 1.5, IE 6.

And more setup info:

- i use Gallery2 in a multisite config
- G2 is part of a Drupal multisite config.

When i try going through XP Publish it gets to the point where it asks me for the Gallery/site to publish to; then it tries to connect and comes back with:

Web service error.

Wizard could not connect to the internet....

I have tried everything mentioned in this forum:

- cleared cookies in IE
- cleared G2 cache

I have turned debugging on and the file generated when trying to publish can be seen at:

www.allanalog.com/XPwizardIssue.txt

maybe someone can take a look???

The only 2 things i see of interest are:

- near top of log i get:

2006-01-04 12:00:25 [<no session id>] Unimplemented: GalleryUrlGenerator

and near bottom i get:

1016: Can't open file: 'g2_imageblockcachemap.MYI'. (errno: 144)<br>

but this last one i get with any action on my gallery and gallery still works (other than XP publish).

thanks,
peter....

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-04 18:21

you have to enter the url to your multisite g2 (where main.php is). don't enter the url to your drupal or to the codebase.

Quote:
1016: Can't open file: 'g2_imageblockcachemap.MYI'. (errno: 144)<br>

that's a serious database error, not caused by g2.
try to repair the table with
repair table g2_imageblockcachemap;

or just disable AND uninstall the imageblock module of g2.

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 19:51

mmm.. ok, sounds sort of interesting, but...

enter url to multisite where??? Not sure what you are referring to. For XP Publish i simply go to my gallery (which is g2 ms out of drupal ms) and it says to download install_registry.reg file; which i then merge.

This will now give me the option to pick that site when i do a publish from a folder on my XP machine. At no point to i need to enter a url. The site location info, i assume, is part of the reg file that gets downloaded.

so i tried going to the table and sure enough it was corrupted; i had a lot of problems with image block when setting up multisite so perhaps related. Anyway; did the repair and it seems to have fixed. I no longer get the 1016 error message.

BUT - as expected; XP Publish still does not work - as i mentioned, i didnt think they were related. Perhaps it is the URL thing yuo are referring to???

peter...

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 19:53

one more bit of info:

i looked at the reg file that gets merged at it looks like:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\PublishingWizard\PublishingWizard\Providers\petersplace.allanalog.com]
"displayname"="Gallery at mysite.com"
"description"="Publish Your Photos and Movies to Gallery"
"href"="http://mysite.com/?q=gallery&amp;g2_view=publishxp.Login"
"icon"="http://mysite.com/gallery2/favicon.ico"

When i take href and paste into browser it does go to Gallery start page for my Drupal site - which seems correct.

The icon file was missing; i added it - didnt help.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-04 20:12

http://mysite.com/?q=gallery&amp;g2_view=publishxp.Login"

i guess that should rather be the URL to your gallery2 and not your embedded gallery in drupal.

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 20:29

sorry.. still don't quite get it.

There is no URL to my Gallery2 site.

The way Drupal/Gallery MS is set up is:

/drupal - drupal main folder
/drupal/gallery2 - gallery2 codebase

/drupal/sites/site1 - site 1 of drupal msite
/drupal/siets/site2

/drupal/galleries/site1 - gallery for site1
/drupal/galleries/site2 - gallery for site2

site1.com and site2.com are simply Apache VirtualHost "aliases" to the same top site for Drupal (drupal then sorts out which site to go to based on domain name matches to site1, site2 folder names - i guess gallery does something similar???

so my example registrey file above is referencing site1.com (in example here)

so from your other hint.. i tried changing registry href to :

http://site1.com/galleries/site1/?q=gallery&amp;g2_view=publishxp.Login

I uess it got a bit further since i now get a IE window opening with a "smarty debug console". Still not right but pretty sure it has connected now.

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 20:43

my bad... re-tried with the href url changes to link above and now i still get "web service error" as before. Not sure what i did to get smarty debug opening.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-04 20:50

what's the url to your non-embedded g2? the real one.

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 20:57

whooo hooo....

so i tried this:

pasted: http://site1.com/?q=gallery&g2_view=publishxp.Login (basically just replaced &amp; with &)

and it seems to mostly work now:

- if i open IE and log into my site; then when i publish it takes me to browser and asks me to pick album - and everything is good.

- if i hadn't logged in it asks me for user/pass but doesnt accept my drupal username/password - but i thnk a different one when setting up gallery - should be using different ones though??? - so when i log in with g2 user/pw i get another smarty debug window.

anyway... i need to test a couple things but basically i think the BUG is that the G2 registry file uses &amp; (which does seem like it should work) but doesn't.

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 21:13

again, not sure what you keep meaning by "the real one".. i don't have a URL to G2. but i do have these urls to folders off my drupal site:

site1.com - in apache points to drupal home dir; but drupal directs to sites/site1

site1.com/gallery2 - a folder of main drupal site

site1.com/galleries/site1 - specific G2 folder used by site1

the one that seems to work is the first one (once i strip out the &amp;);

i think the G2 and drupal multisite stuff is doing the right thing here - i shouldn't need to point to specific sub folders (as i think you are suggesting)... and as it turns out i don't.

I guess a good next test would be does this all still work for site2 - it will have the same wiz href except it will be http://site2.com/?gallery....

but, these basically both (though apache) simply point to the same place - my root dir for drupal.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-04 21:28

is "site1.com" your real domain? i'm asking for a real link to your standalone multisite gallery2.

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 21:44

too funny... sorry...

the real site is at: http://petersplace.allanalog.com/

so i guess link to G2 site is: http://petersplace.allanalog.com/galleries/petersplace/main.php

which, when i go there does go to a G2 site without Drupal wrapped around it .. cool... but also pops open smarty debug as well... not cool.

which i guess means my site security is not set up well.. since link to G2 on its own should not be allowed.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-04 22:03

the smarty stuff only pops up if setDebug() isn't setDebug(false) in your config.php of g2.

could you please try to go to
http://petersplace.allanalog.com/galleries/petersplace/main.php -> add items -> publish xp, copy the registry file, execute it on your computer, try publish xp.

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 22:18

yes.. that does work.. .BUT... that is not a valid URL... no one should ever be able to go to a sub-folder within my drupal site.

so i will still need to make the reg-info file be correct from the correct location - and i am not sure now why it doesn't work if the only issue i manually fixed was removing expanded sytax for "&" - i i wll need to try the whole thing from start to finish and see where the problem is - and then i suspect this is a bug in the G2/drupal integration that i will likely see if i can fix myself.

thanks for all your help,
peter...

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 22:21

ahhh.. i just looked at new registry file and it has:

"href"="http://petersplace.allanalog.com/galleries/petersplace/main.php?g2_view=publishxp.Login"

i.e. no &amp; - so maybe the bug is on G2's side when integrating with drupal??? need to see whose code decides to use "&amp;" rather than just "&"

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-04 22:33

you can switch to mode.embed.only in config.php to forbid direct access to g2.

@&amp vs &:
thanks for finding this issue!

fixed in the development version (G 2.1), not in the normal CVS branch tough.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-04 22:36

g 2.0.2 / g 2.0 has no option to easily say the gallery url generator to not use &amp; but & instead (useful for javascript or...publish xp).
so i suggest if you want to fix your g2 manually, you can hardcode the correct url in
gallery2/modules/publishxp/templates/DownloadRegistryFile.tpl
instead of
"href"="{g->url arg1="view=publishxp.Login"}"
make it
"href"="http://site1.com/?q=gallery&g2_view=publishxp.Login"

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 22:42

final test... start everything from scratch.. and yes.. the only problem was the &amp; needs to be just &

also, the XP publish doesnt make thumbnails.. .which is kind of a pain - although i am guessing ia can rebuild them later.

i guess now i need to dig around in the code a bit to see where the &amp; gets inserted.

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 22:45

i think i am replying faster than readin your replies... so getting a little outa sync here...

but i will look at your code suggestion fix.

thanks again,
peter....

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 23:18

so i guess the rebuild thumbs from the gallery admin does not work on the images that were "XP Published"... so now, again it is not a usable feature as it is... i will check the forum to see if there is an known issue with this.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-04 23:30
Quote:
so i guess the rebuild thumbs from the gallery admin does not work on the images that were "XP Published"..

that doesn't make sense at all, no.
thumbnails / rebuilding thumbnails has nothing to do whether the images were uploaded with publishxp, from browser or by any other method.

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Wed, 2006-01-04 23:30

ok, figured iw ould try to fix the & issue... your suggestion of hard coding won't work too well for me since it will break all my other sites. I will have to look into this more.

 
ptalindstrom

Joined: 2006-01-04
Posts: 33
Posted: Thu, 2006-01-05 05:20

well thumbnails are now being built... i think it has something to do with a bug somewhere related to image block.. the image block has been very flaky for me.

basically the g2_imageblockcachemap table seems to be regularily getting corrupted; and i think when it is the thumbnails don't get generated when i publish.

repaired the table and thumbs are now built when i publish (but they are not repairable) i had to dump album and re-publish after repairing table.

i can't seem to get the table to corrupt; but will keep an eye on it.. it seemed like it was corrupting every time i tried to delete a pic; the first time i deleted it would be fine (i.e pic deleted ok, but i suspect table got corrupted); the 2nd time i deleted i get a bunch of error msgs spit out - these error msgs continue if i try to delete until i go and repair the imageblockcache table

but can't seem to get it to do it now - which i guess is good.. but i am sure it will come back.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-01-05 12:53

please don't discuss the same issue in 2 parallel topics. thanks.