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 Website: http://www.d-eye.be Any help much appreciated! Kind regards, |
|
Posts: 1378
Sorry jamesjoyce,
Just getting back into the support thing.. What insert button are you referring to??
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 11
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...
Posts: 24
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
Posts: 24
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
Posts: 24
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
Posts: 11
No one with a solution yet? Thanks!
Posts: 24
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
Posts: 11
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!
Posts: 8
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.
Posts: 24
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
Posts: 8
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);
Posts: 135
I'm using the image chooser with Drupal 5.9 and I have the same issue.
The insert button does nothing.
Posts: 24
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
Posts: 11
Personally, I think it al started with the new WordPress installation.
Posts: 24
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
Posts: 3
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?
Posts: 11
Thanks for your input, Stevation. I've tried the second solution (first one is impossible) but no... Somewhere there must be a working solution...
Posts: 75
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
Posts: 1
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
Posts: 24
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
Posts: 2
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).
Posts: 75
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¤t_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