I can't get the links from Drupal to Gallery2 to work because Drupal outputs the wrong URL. It should be http://www.mywebsite.com/gallery?g2_view=core.SiteAdmin&g2_subView=core.AdminModules but instead Drupal outputs:
http://www.mywebsite.com/gallery&g2_view=core.SiteAdmin&g2_subView=core.AdminModules which gives an error in Gallery2

Comments

profix898’s picture

Category: bug » support

What are your settings for embedded gallery paths, especially for the 'embed URI' path? It should be something like '/index.php?q=gallery'. I dont think its a bug, but more likely your configuration ...

zahor’s picture

No it wasn't my configuration. I tried every configuration with the URI I could think of. The solution was to edit gallery_settings.inc and remove the "&" and replace it with "?".
Like in this line:

  • ?g2_view=core.SiteAdmin&g2_subView=core.AdminThemes&g2_mode=defaults">Themes

    Now if it's supposed to work with the ampersand instead of the question mark, let me know.

    ON a side note, I still can't get the embed to work. It just links to a page on my site (really a list of images).

  • profix898’s picture

    I guess you are talking about the '_gallery_links_settings()' function, right? The embedURI variable defaults to '?q=gallery', so with your modification you would get ?q=gallery?g2_view=core.SiteAdmin&g2_subView=core.AdminThemes&g2_mode=defaults instead of ?q=gallery&g2_view=core.SiteAdmin&g2_subView=core.AdminThemes&g2_mode=defaults and that not correct! If you post some details about your installation (server/public path to Drupal, server/public path to Gallery2 standalone and your current embed path configuration) there is a real chance to help you in getting this right ...

    P.S. If you want to post html/php code you should enclose it with <code> tags in your posts.

    zahor’s picture

    But the code that is correct gives me an error from gallery2 , and my modified code works. I don't use the ?q=gallery as my embed URI, I use "/gallery/main.php" which works fine. Nothing else did.

    Gallery2 is installed in a folder called "gallery"

    URI is: /gallery/

    Location: /home/developw/public_html/gallery/

    Embed URI
    /gallery/main.php

    The autodetect value was /index.php/?q=gallery

    Just entering ?q=gallery did not work on the site, it would just redirect to the homepage, so I didn't think that would work. and sure enough it didn't. Also I tried entering the &...address in the address bar while logged into Gallery2, that didn't work, got an error. Replaced the & with ? and then it went to the page it was supposed to go to.

    Is there another way?

    profix898’s picture

    Gallery2 is installed in a folder called "gallery"

    This will not work. From the INSTALL.txt: ***Warning*** - Do not name your Gallery2 directory "gallery", call it something else (eg "gallery2"). Calling it "gallery" will cause a conflict with the Drupal gallery.module as Drupal assumes that http://www.example.com/gallery refers to the Drupal module. You should rename your folder to 'gallery2'. After that '/index.php/?q=gallery' should be fine as 'embed uri' path and generated URLs should be valid as well. Read http://codex.gallery2.org/Gallery2:FAQ#How_can_I_move_my_gallery_install... for details on moving your G2 installation.

    zahor’s picture

    Links from "Links to Gallery2 Site Admin" section still redirect to a page on my site.

    zahor’s picture

    With the default setting, nothing works. If I click on the random images, it takes to a list of images from the image gallery module of Drupal.
    The Admin links that are supposed to take me to Gallery2, links to the same page of images.

    What am I doing wrong?

    zahor’s picture

    OK, I got it now.

    Phew.
    Thanks for the help.