We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17691
    • 22 Posts
    Morning!

    @ nicpan
    Yes this is my configuration at the module. I also try other strings and they also works but the problem can’t get solved undecided
    I see the page correctly with the Admin, Export and Import Links. This is not the problem. When i open the Admin Link i got this screen:



    In my old installation i’m directly logged in as the user admin and i can add albums and config the gallery. Now i only can register a user but there is nothing a link to login or for the administration.

    When i open the gallery2 installation direct with the URL-link i see this page:


    Here i can login and the add albums, config, ...
    And this was my problem now!

    @ muramoto
    Oh, i think it’s a good english, better than mine laugh
    My other modules works but there are nothing to login or that i need a user account.
    First i also have the problem that the values (G2 path, URL Path) don’t get save. I think the configuration string is bad, so i directly add my values to the string and copy it in the textbox above. Now the values get save. My configuration string looks like now:
    &mpth=Module Path;string;assets/modules/gallery/ &g2pth=G2 path(ex /var/www/html/gallery2/;string;/var/www/html/modx/gallery2/ &g2uri=URL path to G2(ex /gallery2/);string;/gallery2/ &ondel=When deleting;list;Leave Gallery user,Delete Gallery user; &admid=Admin User;string;admin

    Thanks for the answer of the sync user question wink Now i understand what nicpan means.

    I also enable the "OnWebLogin" event at gallery plugin. But this also don’t solve my problem.

    I hope somebody can help me with my problem sad
    Thanks!!!

    Lupo
      • 20644
      • 37 Posts
      I’ll test and give you feedback!
      If you want some help, no pb.
      Thanks,nicpan!


      To lupo1
      Good morning!(Good Afternoon in Japan smiley)

      &mpth=Module Path;string;assets/modules/gallery/ &g2pth=G2 path(ex /var/www/html/gallery2/;string;/var/www/html/modx/gallery2/ &g2uri=URL path to G2(ex /gallery2/);string;/gallery2/ &ondel=When deleting;list;Leave Gallery user,Delete Gallery user; &admid=Admin User;string;admin
      &g2uri=URL path to G2(ex /gallery2/);string;/gallery2/
      Is this "/modx/gallery2/" ? Because Gallery2 path is /var/www/html/modx/gallery2/.
      Or,Is your site root "/var/www/html/modx/" ?

        • 17691
        • 22 Posts
        Hi muramoto!

        The path is OK because the root is /var/www/html/modx/

        Now i try your Beta 3. But now i get many errors :’(
        I add a webuser "admin" with the same data as the user "admin" of the gallery. But nothing. Now i also can open the gallery module start page (with the Admin, Import and Export links). When i now open the admin page i get this errors:

        Error (ERROR_MISSING_OBJECT) : admin GalleryUser
        in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 142 (G2CMS_Admin::error)
        in modules/core/classes/GalleryCoreApi.class at line 2424 (G2CMS_Admin::loadEntityByExternalId)
        in modules/core/classes/GalleryEmbed.class at line 227 (G2CMS_Admin::loadEntityByExternalId)
        in modules/core/classes/GalleryEmbed.class at line 131 (G2CMS_Admin::checkActiveUser)
        in /var/www/html/modx/assets/modules/gallery/g2cms.admin.class.inc.php at line 30 (G2CMS_Admin::init)
        in /var/www/html/modx/manager/processors/execute_module.processor.php(95) : eval()’d code at line 29 (G2CMS_Admin::execute)
        in /var/www/html/modx/manager/processors/execute_module.processor.php at line 95
        in /var/www/html/modx/manager/processors/execute_module.processor.php at line 82
        in /var/www/html/modx/manager/index.php at line 532

        shocked What??

        greetings, Lupo
          • 20644
          • 37 Posts
          To lupo1

          I find my mistake.
          nicpan write:
          I’ve noticed that With the MODx bridge, the modx usernames are passed to the g2_ExternalIdMap table. In the gallery codex, all exemples are with IDs, that was why i had some problems with being logged into gallery.
          lupo1, Be carreful to pass in the parameters the webusername of the user in MODx that is admin in gallery. They must have the same username.
          I can understand the meaning.
          Because the username not mapped to ExternalIdMap, it happend "Error (ERROR_MISSING_OBJECT) : admin GalleryUser".
          I changed g2cms.admin.inc.php, the problem cause to my change.
          under the line
          		if ($ret) { 
          			 echo $ret->getAsHtml();
          			 exit; 
          		} 

          Please add this code.
          	    if(GalleryEmbed::isExternalIdMapped($this->g2AdminId,'GalleryUser')!=null) {
          			 $user = GalleryCoreApi::fetchUserByUserName($this->g2AdminId);
          		     if ($user[1]->_id>0) {
          			  // add id map
          			    $ret = GalleryEmbed::addExternalIdMapEntry($this->g2AdminId, $user[1]->_id, 'GalleryUser');
          				GalleryEmbed::checkActiveUser($this->g2AdminId);
          		     }
          	    }
          


            • 17691
            • 22 Posts
            @ muramoto

            Thank you for your fast reply!!! kiss I replace the code with the new one and no i can open the Gallery Admin but i also don’t have a possibility to login or anything else to administrate the gallery :’(

            I think i don’t understand this with the users? undecided
            Let me show my situation. I only have the user admin (what i make with the installation) for the Gallery 2. Then i have a Webuser admin in MODx wich has the same Name (Gallery-Administrator = not the username) as the Gallery 2 admin. I don’t have other special settings. I hope this is correct.
            But when i try the gallery i don’t logged in at MODx with the manageruser admin. But i think this is doesn’t matter because i get the same error when i logged in as the admin user in MODx?

            huh huh huh

            greetings, Lupo
              • 20644
              • 37 Posts
              To lupo1

              Sorry,my mistake.
              I attached the new file.

              I remove " ActiveUserId" from g2cms.admin. (from snnipet too)
              And back to the old code(snnipet too).

              		if ($this->g2AdminId) {
              			// check is id map already exists
              			if(GalleryEmbed::isExternalIdMapped($this->g2AdminId,'GalleryUser')==null) {
              				GalleryEmbed::checkActiveUser($this->g2AdminId);
              			}
              			else {
              				$user = GalleryCoreApi::fetchUserByUserName($this->g2AdminId);
              				if ($user[1]->_id>0) {
              					// add id map
              					$ret = GalleryEmbed::addExternalIdMapEntry($this->g2AdminId, $user[1]->_id, 'GalleryUser');
              					GalleryEmbed::checkActiveUser($this->g2AdminId);
              				}
              			}
              		}
              


                • 17691
                • 22 Posts
                @ muramoto
                Thank you!!! But it don’t solve the problem undecided

                First look:


                Then i open the Gallery Admin:


                No administrative options or login Link to see huh

                Lupo
                  • 20644
                  • 37 Posts
                  Umm....I can’t understand the reason..

                  Could you try import users checked overwrtite box?
                    • 17691
                    • 22 Posts
                    Hi!

                    Yes, this is no problem! I can successfull import the users and they are also correct in the MODx Webuser Management.
                    Can you show me a picture how your Gallery Admin looks like in MODx?

                    Or can anybody tell me what i’m making wrong? huh
                    Can the problem be with the modxfix.zip and g2cms.zip files? I think the modxfix i don’t be needed in the new 0.9.5 version. But i also copy the files into the directories. And the g2cms.zip is the module (your beta zip file).

                    I also don’t see a login link when i open the site where i build in the gallery snippet. I looks like the same as my site in MODx huh

                    Thanks for every help sad

                    greetings, Lupo
                      • 10190
                      • 187 Posts
                      Quote from: lupo1 at Feb 09, 2007, 06:10 AM

                      ...
                      No administrative options or login Link to see huh
                      ...

                      Hi Lupo,

                      while still having problems too, your problem could be solved via the configuration tab where you put in your admin user. For me with 0.9.1 it had to be the same in gallery as well as in the modx manager.

                      It should be possible to look up your G2 installation directly without modx, like http://yourmodxurl/gallery2 or s.th. similar - try going there to the admin area and configure the same admin with the same password as for modx.

                      One further guess could be about caching, try disabling caching for the first try in G2 and modx and call the gallery frontend via [!gallery!].

                      When things work, you can enable caching step by step.

                      Just guessing, but maybe a hit?

                      HTH
                      Frisco