Embedding G2 into Drupal 4.6.3 breaks Drupal admin

chrisfive

Joined: 2005-10-19
Posts: 12
Posted: Sun, 2005-10-23 21:03

I have Drupal and G2 (CVS 2005/10/16) working independently with mod_rewrite & clean URLs. Upon trying to embed G2, I get the following odd behaviour:

* When I install gallery.module (version 1.11), I get the following error message whenever I access gallery-related Drupal administration actions (e.g.
administration -> setting -> gallery,
administration -> blocks -> Gallery Block configure -> Save Block,
administration -> blocks -> Save Blocks).

Quote:
warning: Cannot modify header information - headers already sent by (output started at /home/myuser/mysite.com/modules/gallery.module:392) in /home/myuser/siteroot/includes/common.inc on line 192.

* I also do not see the "Embedded Setup" section in Gallery Admin -> URL Rewrite -> Setup

Notes:
- Site is hosted on Dreamhost
- I have successfully renamed "gallery2" directory to "showroom" as per an article that I can't seem to find at the moment :-)
- ImageBlock is installed and activated in Gallery
- Gallery Block is activated in Drupal
- gallery.module is supposed to fix #31398 - block settings not saving properly but it is still not working for me.

Here is my URL:
http://fmov.idassets.com/gallery/somecar/03-ferrari-360-fi-silver-side-mp.JPG.html

Any help / advice is much appreciated.

Chris

 
kiz_0987

Joined: 2005-02-27
Posts: 189
Posted: Sun, 2005-10-23 22:46

Chris,

The cvs version still has problems. See http://codex.gallery2.org/index.php/Gallery2:How_to_Embed_Gallery2_in_Drupal for info.

I don't believe there is an embedded setup part of URL rewrite. Just set up the 'Show Item' rule and deselect the rest. It looks like this is working on your site.

Not sure about the "headers already sent issue". From what I could see it always complains about the last line in the gallery.module file. Maybe this is coincidence, or maybe there is some extra white space or other characters that are causing issue. Perhaps try getting it again from cvs and reinstalling it. In fact the line it complains about (392) does not exist in my version of 1.11 (391 is last line).

 
chrisfive

Joined: 2005-10-19
Posts: 12
Posted: Sun, 2005-10-23 23:34

Thanks for replying so quickly! Yes, I found that article very useful (although it took me a bit to realize how to actually obtain gallery.module).

The "URL Rewrite" is set as per the article to "Show Item" only. I've only found this to work with "gallery/%path%", not "showroom/%path%" (which is really what I want) nor anything else for that matter. I wonder if that has anything to do with the fact that I renamed the G2 directory to "showroom"...

On a happy note, there WAS an extra carriage return on the last line of gallery.module! Removing that fixed the "headers already sent" issue. I dunno why I didn't pick up on that before. Nice to know I was reading and following instructions properly :-)

Any idea why I can't see the "Embedded Setup" section in G2 admin -> URL Rewrite -> Setup?

Thanks again.

Chris

 
kiz_0987

Joined: 2005-02-27
Posts: 189
Posted: Mon, 2005-10-24 01:07

Good to hear this worked for you. As I say, I do not think there is such an "Embedded Setup" section in G2 admin. Where did you see that there was? What do you want to do with it?

The URL rewrite will have to remain "gallery/%path%" and it is not related to your change of G2's directory. The "gallery" part it is refering to is the "gallery" in "gallery.module". The way the code for gallery.module works relies on its name being gallery. There is not much you can do about it. The only option I've been able to come up with is to add a URL Alias in Drupal which links say "showroom" with "gallery". That was people could type http://fmov.idassets.com/showroom and get to your gallery -- BUT every link in there will still be http://fmov.idassets.com/gallery/XXX.

 
chrisfive

Joined: 2005-10-19
Posts: 12
Posted: Mon, 2005-10-24 01:37

The G2 admin "Embedded Setup" I'm referring to is described in http://codex.gallery2.org/index.php/Gallery2:EmbeddedRewrites. I followed the instructions to generate the .htaccess file, but do not get the screens shown in section "Configuring URL Rewrite". Do I need this?

It just makes me think that not everything is working properly.

 
kiz_0987

Joined: 2005-02-27
Posts: 189
Posted: Mon, 2005-10-24 10:23

Ah yes, I forgot about that bit. Note that the "embedded setup" is under the "setup" tab (one of three tabs on the page). You will need to access the G2 site admin on the embedded gallery to see this I think. ie go to http://fmov.idassets.com/gallery and then click "site admin", not via http://fmov.idassets.com/showroom.

Also, my comment about adding a URL alias for showroom is generally valid, but I think you would need to call it (or your G2 dir) something else, or else there will be a confusion between "showroom" (the url alias) and "showroom" the G2 gallery directory.

 
chrisfive

Joined: 2005-10-19
Posts: 12
Posted: Mon, 2005-10-24 18:15

There it is! Thanks for all your help :-) I'm sure this information will help the next person having trouble embedding G2 into Drupal.

Now to go theme-diving.