Insert button doesn't work

jamesjoyce

Joined: 2008-02-26
Posts: 11
Posted: Wed, 2008-07-02 08:45

Hi,

It seems that the insert button doesn't work. I can choose an album/pictures but when I click on the insert button, nothing happens. I've tried it in the visual and html editor with and without TinyMCE activated.

WordPress 2.5.1
Gallery 2.2.4
WPG2 3.0.6
vSlider 3.1

Website: http://www.d-eye.be

Any help much appreciated!

Kind regards,
Rudy

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sun, 2008-07-06 11:58

Sorry jamesjoyce,

Just getting back into the support thing.. What insert button are you referring to??

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
jamesjoyce

Joined: 2008-02-26
Posts: 11
Posted: Sun, 2008-07-06 12:15

Sorry, when I'm in the editor and I click on the G2 button, "Gallery2 Image Chooser" window is available. It's here that I can choose an album, a picture but when I click on the insert button under "Press button to insert checked image(s)" nothing happens. Odd thing is, it worked before...

 
texassaluki

Joined: 2006-04-08
Posts: 24
Posted: Sun, 2008-07-06 22:44

ok... I am having the same problem. When I am trying to insert a picture nothing happens. I has worked in the past

After I select a picture to insert and click "insert" nothing happens

my site is www.thenolands.com

any ideas?

Chris

 
texassaluki

Joined: 2006-04-08
Posts: 24
Posted: Mon, 2008-07-07 15:38

so is this a G2 Image chooser problem? Since it looks like ozgreg moved the topic...

I have been messing around with this again today and it does not seem the pop up where you select the image is communicating with the editor box. Is this maybe a problem with tinyMCE?

Chris Noland
Flower Mound, TX

www.thenolands.com

 
texassaluki

Joined: 2006-04-08
Posts: 24
Posted: Wed, 2008-07-09 17:17

using firebug I found the form does not seem to be filling out correctly

window.opener.document.forms[g2ic_form] has no properties
insertHtml("<a href="http://www.thenolands.com/wpg2?g2_itemId=13109"><img src="http://www.thenolands.com/gallery...", form)functions.js (line 161)
insertItems()functions.js (line 373)
onclick(click clientX=0, clientY=0)g2image.php (line 1)
[Break on this error] insertAtCursor(window.opener.document.forms[g2ic_form].elements[g2ic_field],ht...

Chris Noland
Flower Mound, TX

www.thenolands.com

 
jamesjoyce

Joined: 2008-02-26
Posts: 11
Posted: Fri, 2008-07-18 15:15

No one with a solution yet? Thanks!

 
texassaluki

Joined: 2006-04-08
Posts: 24
Posted: Thu, 2008-07-24 02:22

I cannot figure out why it is not filling in the information.... it seems everything is there

James is your Wordpress in the root directory or a sub directory? mine is in a sub... but cannot think that is the problem

Chris Noland
Flower Mound, TX

www.thenolands.com

 
jamesjoyce

Joined: 2008-02-26
Posts: 11
Posted: Thu, 2008-07-24 08:38

Chris,

My WordPress is in the root directory. I've tried uninstalling, installing new version, ... Verification is OK but the only thing that doesn't work is filling in the information after clicking teh insert button. I keep searching!

 
pacman37

Joined: 2007-11-23
Posts: 8
Posted: Wed, 2008-07-30 04:27

I'm having the same issue . . . started when I upgraded to Wordpress 2.6. I hit the insert button, but the G2Image chooser doesn't close, it just sits there no matter how many times I hit the button. Same issue in IE and Firefox. IE indicates an error on the page, details say permission denied Line 157, Char 7 of G2image.php.

 
texassaluki

Joined: 2006-04-08
Posts: 24
Posted: Thu, 2008-07-31 00:09
pacman37 wrote:
I'm having the same issue . . . started when I upgraded to Wordpress 2.6. I hit the insert button, but the G2Image chooser doesn't close, it just sits there no matter how many times I hit the button. Same issue in IE and Firefox. IE indicates an error on the page, details say permission denied Line 157, Char 7 of G2image.php.

Do you have firebug loaded? what is the error that it indicates

if you don't have firebug it is located here

https://addons.mozilla.org/en-US/firefox/addon/1843

It would be interesting if it is the same error we are receiving

Chris Noland
Flower Mound, TX

www.thenolands.com

 
pacman37

Joined: 2007-11-23
Posts: 8
Posted: Tue, 2008-08-05 03:59

It's the same I think

window.opener.document.forms[g2ic_form] is undefined
insertHtml("<a href="http://cassleman.com/wpg2?g2_itemId=8284&g2_GALLERYSID=TMP_SESSION_ID_DI_NOISSES_PMT"><img src="http://cassleman.com/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=8286&g2_GALLERYSID=TMP_SESSION_ID_DI_NOISSES_PMT" width="150" height="150" alt="There was some e-mail waiting for me" title="There was some e-mail waiting for me" class="g2image_centered" /></a>", form)functions.js (line 161)
insertItems()functions.js (line 373)
onclick(click clientX=313, clientY=203)g2image....Bow%3D%3D (line 2)
[Break on this error] insertAtCursor(window.opener.document....s[g2ic_form].elements[g2ic_field],html);

 
djpumpkin

Joined: 2006-12-06
Posts: 135
Posted: Sun, 2008-08-10 10:12

I'm using the image chooser with Drupal 5.9 and I have the same issue.
The insert button does nothing.

 
texassaluki

Joined: 2006-04-08
Posts: 24
Posted: Mon, 2008-08-25 05:18

I did a "fresh" install of wordpress to see if I could try and get this to work... still receiving the same issue (I was having problem's logging into my site)

so maybe the gallery settings are not correct? It seems like the information in the script is correct but is not inserting into the window.

Also are you using the internal or custom Header and Footer files?

If anyone is having a similar problem and just tracking this post please drop a note in... want to get an idea if something with the last few versions of Wordpress may have broken this

Chris Noland
Flower Mound, TX

www.thenolands.com

 
jamesjoyce

Joined: 2008-02-26
Posts: 11
Posted: Tue, 2008-08-26 07:33

Personally, I think it al started with the new WordPress installation.

 
texassaluki

Joined: 2006-04-08
Posts: 24
Posted: Thu, 2008-08-28 02:16

I really thing this is a Java Script error as I have been poking around with firebug. I have no idea how to determine if it is a conflict with something else or just an affect of the new version and how it is setting up the edit windows.

Anyone have any idea when Captain_Kirk is getting back??

Chris Noland
Flower Mound, TX

www.thenolands.com

 
stevation

Joined: 2006-07-16
Posts: 3
Posted: Fri, 2008-09-19 20:21

This sounds a little like a problem with session variables (not that I *really* know what that means!) that some of us had in a previous version. There's a thread about it here: http://www.galleryembedded.com/forums/viewtopic.php?t=7035

You can see some changes suggested on page two of that thread that fixed it for some people. I know this is a newer version of G2, but perhaps the problem has some of the same roots?

 
jamesjoyce

Joined: 2008-02-26
Posts: 11
Posted: Sat, 2008-09-20 08:19

Thanks for your input, Stevation. I've tried the second solution (first one is impossible) but no... Somewhere there must be a working solution...

 
leslienord

Joined: 2003-09-08
Posts: 75
Posted: Sat, 2008-10-18 15:32

I'm having the same problem - I have the latest versions of WP version 2.6.2 and the WPG2 version 3.0.7 module and it's just not working. Hopefully a fix is on the way. I love this feature.

Leslie

 
jlevinger

Joined: 2009-04-21
Posts: 1
Posted: Tue, 2009-04-21 19:04

The fix from stevation's link works for me. Add these two lines to the insertHtml function in wp-content/plugins/wpg2/g2image/jscripts/functions.js after the g2ic_form and g2ic_field definitions:

//seems PHP session variables aren't being passed in
//fill them in manually
g2ic_form='post';
g2ic_field='content';

Then the insert button works again. Hope that helps someone else,

- Josh

 
texassaluki

Joined: 2006-04-08
Posts: 24
Posted: Mon, 2009-04-27 18:21

guys,

to get this to work for me... I blew away my existing Gallery directory and reinstalled

Using the same database and media files it seems to work now.

I think one of the patches broke the insert ability but when it is a native install it works

something to try

Chris Noland
Flower Mound, TX

www.thenolands.com

 
Andrew501

Joined: 2007-05-17
Posts: 2
Posted: Mon, 2009-09-21 08:10

Ok, so jlevinger was right on with what needs to be modified. But setting those variables to those values didn't work for me.
I made it work by hardcoding the form and field values into the arguments for the call to InsertAtCursor.
Here is how you find what to do:

1. Disable javascript from hiding the address bar (we are going to use it)
2. Click on the G2Image button
3. Look at the text in the address bar
Mine says http://site/plugins/gallery2_plugin/g2image/g2image.php?g2ic_form=item_checkchanges&g2ic_field=itemform_post_content&g2ic_tinymce=0
4. The items in bold may be the same for you, may be different depending on where the plugin is installed.

5. Find the functions.js file for the g2image plugin
jlevinger listed the location for him.
Mine is in "/plugins/gallery2_plugin/g2image/jscripts"
6. Find the function "InsertHTML" -- you can use the find function in your browser or notepad
7. Locate the line that that calls InsertAtCursor and change it to something like this:
insertAtCursor(window.opener.document.forms['item_checkchanges'].elements['itemform_post_content'],html);
Notice the bolded words match up with the ones we looked at in step 3.

8. Save the JS file and force your browser to refresh all (ctrl-F5 in mozilla works when looking at the image picker).

 
leslienord

Joined: 2003-09-08
Posts: 75
Posted: Mon, 2010-03-15 15:11

When I first click the Gallery 2 Image Chooser button to active:

/wp-content/plugins/wpg2/g2image/g2image.php?g2ic_form=post&g2ic_field=content&g2ic_tinymce=0

then after I check the image I want to insert:

/wp-content/plugins/wpg2/g2image/g2image.php?g2ic_page=8&sortby=title_asc&current_album=15&images_per_page=15

I'm not seeing anything else. I suspect I'm not following your instructions quite right. But I have tried doing this in a couple of browsers and I'm getting the same results.

Here is my function from the js file:

insertAtCursor(window.opener.document.forms[g2ic_form].elements[g2ic_field],html);

Thanks,
Leslie

...............
Gallery 2 Image Chooser
Version 3.0.3 - updated 13 MAY 2008