Gallery3 media picker for Wordpress

dpumphrey

Joined: 2011-04-18
Posts: 2
Posted: Mon, 2011-04-18 17:18

Sweet! It is all working now...I knew it had to be something simple and I was just over analyzing it. Kandsten, please let me know if you accept donations - I would be happy to contribute to make sure that this plug-in sticks around for future releases of WordPress and Gallery!!!

Thanks
Dan

 
swiftsam

Joined: 2009-09-23
Posts: 23
Posted: Mon, 2011-04-18 17:24

Excellent, thanks Kandsten for the great plugin and dpumphrey for helping ferret out the problem. I had the exact same problem and never got it together to help do the detective work. Mine works great now as well.

 
kandsten

Joined: 2010-11-26
Posts: 79
Posted: Mon, 2011-04-18 17:39

Donations are always welcome - they go towards the "Take the Mrs to dinner as a thanks for putting up with sometimes long hacking hours" fund. I expect to support (after actually finishing + polishing) the plugin as long as WP and G3 maintain the current workings of their respective API's somewhat - i.e at least throughout WP3 - with or without donations, however.

I just set up a Flattr badge at https://flattr.com/thing/170599/Gallery3-media-picker-for-WordPress (Flattr is a pretty cool solution if you want to drop off small thankyou payments for various software, blog posts, howtos or whatnot), alternatively my paypal addy is

.

 
creationsings

Joined: 2008-02-07
Posts: 57
Posted: Mon, 2011-04-18 17:51

So, would there be any reason a gallery installed on a subdomain would cause this plugin problems? I have mine installed at "http://gallery.creationsings.net/", but no matter what I try, I get the problem just reported by dpumphrey. (and i have included the http:// part in the config panel) It says it successfully detects rest and tree access, but then tells me "no Pictures in this folder." I do not have a separate textbox for gallery3 REST API. Also, both "Loading..." and the "no Pictures" message are displayed at the same time. I know it's not a problem with my API key, also, because I have another client successfully using it.

And just an FYI...I'm currently in the process of migrating everything over to a new host. The new one will give me greater capability to actually try to debug some of these issues. My current host has enough strange configurations and limited access that I recognize my problem could fully be a host configuration issue. However, I thought I'd ask this one last question while the transfer is taking place.

Thanks for your time.

 
kandsten

Joined: 2010-11-26
Posts: 79
Posted: Mon, 2011-04-18 17:58

It'll only show the separate textbox if the plugin detects that it needs to use another URL (which in turn depends on mod_rewrite), so that's normal. It sounds like there's some generic issue with some configuration I'm yet to encounter. I'll get in touch with 1&1 and see if they can set me up with an account so I can properly debug that.

 
beerygaz

Joined: 2011-04-29
Posts: 5
Posted: Fri, 2011-04-29 17:48

I'm having the same "Loading.." & "No pictures in this folder" issue. MY config is correct, I've got an accurate REST API key, and even enabled guest REST access.

The config says "Configuration OK, no Mod_rewrite support" which is wierd as I contacted my hosting provider and they assured me mod_rewrite is enabled.

kandsten, I've PM's you the URL and an API key to test if you can and tell me what I'm doing wrong.

edit: I've managed to enable mod_rewrite by editing my .htaccess file, so that's now enabled but I still have the same problem.

 
Alejandro-SB

Joined: 2011-04-14
Posts: 12
Posted: Fri, 2011-04-29 14:21

Great plug-in. Working OK on my Wordpress 3.1.2 installation.
Thank you so much.

 
thowden

Joined: 2003-07-17
Posts: 22
Posted: Sat, 2011-04-30 03:46

Hi

I've tried installing and configuring this plugin with my current Gallery 3.0.x and WP 3.1.x Single User install.

The plugin installs and I do the configuration with just the following message shown.

Quote:
Detected REST tree support, will use this.

I was not sure what this meant as there is no 'Ok' message to indicate that it is working.
If I try to add media from the gallery in WP, the title of my Gallery appears ok but the page states

Quote:
Module not configured
Sorry, but your Gallery3 module configuration doesn't seem to work:
there is an error possibly with CURL. No mod rewrite.
Please go here to configure

Which leads me back to the plugin configure page.

So I did some debugging in the gallery3-picker/picker.php file and added to the gallery3_connection_test function switch test on $http_status result.

As follows

around line 320

Quote:
case 0:
$options['gallery3_status'] = 'failed';
$options['gallery3_status_message'] = 'there is an error possibly with CURL or with mod rewrite.';
$options['gallery3_url'] = $candidate;
break;

and similar for the without modrewrite option around the (now) line 350

Which now tells me that that there is an error as the http_status is '0'.

As I added into the message, I am guessing that it is in the way CURL is handling my gallery URL, but I am not sure.

I can get an appropriate rest response using the test instructions for Gallery 3 REST. So I dont think it is a gallery issue, but most likely server config.

Ideas? Thanks.

cheers
Tony

Marble Bay
Tonys Tech Blog

 
thowden

Joined: 2003-07-17
Posts: 22
Posted: Sat, 2011-04-30 04:21

Hi

I forgot to mention that an alternative G3Client WP Plugin gets the same/similar error but a message is logged in the server/php log

Quote:
PHP Warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in absolute_path/wp-content/plugins/g3client/client.php on line 72

So I am sure it is curl that is the issue. Now to figure out why.

cheers
Tony

Marble Bay
Tonys Tech Blog

 
thowden

Joined: 2003-07-17
Posts: 22
Posted: Sat, 2011-04-30 06:25

Further confirmation that it is not Safe Mode as this is Off and probably the open_basedir which is set

Quote:
/mytestsiteabsolutepath:/tmp:/usr/share/pear:/usr/share/pear-addons

So what is / is there a work around for open_basedir?

Don't worry, its not that. I have just disabled the open_basedir directive in the httpd.conf and checked that phpinfo.php reports that open_basedir = no value and safe mode is off and I still get the same error in both G3Client and Gallery3_Picker plugins. Except that while the error / status is '0' G3Client no longer gets the CURL error. So I must assume that the reason for the status = 0 is not CURL.

Stumped!

cheers
Tony

Marble Bay
Tonys Tech Blog

 
thowden

Joined: 2003-07-17
Posts: 22
Posted: Sun, 2011-05-01 04:16

Hi

Ok, I think I have this worked out. cURL is installed and working, but due to an oversight in my dns setup my test box did not know the alias that I was using for the site.

Testing cURL at the command line made it obvious.
`# curl -v http://devsites.mydomain/mysite/gallery/index.php`
results in
`* getaddrinfo(3) failed for devsites.mydomain:80
* Couldn't resolve host 'devsites.mydomain'
* Closing connection #0
curl: (6) Couldn't resolve host 'devsites.mydomain'`

adding the correct host entry to the local server dns resolved this issue and provided the correct responses.

Perhaps the error handling that I added to the picker.php file during my testing could be revised and added to the installed file.
It would probably shorten the problem solving cycle for anyone with a similar issue.

I have updated in my copy of the picker.php the following sections of the picker.php file
for both sections as described above the message text should be updated:

Quote:
case 0:
$options['gallery3_status'] = 'Status returned 0 or no value';
$options['gallery3_status_message'] = 'There is an issue with the server config.';
$options['gallery3_url'] = $candidate;
break

and in the html presentation section around line 600 I've inserted a new text explanation of the status = 0 issue above the 'Detected REST tree' message section.

Quote:
<?php else: ?>
<?php if ($optionarray_def['gallery3_status'] == 'Status returned 0 or no value'): ?>
<p>The http status was returned as 0 by cURL.<br />
This is known to occur with cURL install and DNS issues.<br />
Test at the command line of your server by using curl with -v option (verbose output) and the url of your gallery installation.<br />
e.g.<br />
#curl -v http://yoursite.yourdomain/gallery_url<br />
This should point you at the cause of the issue.</p>
<?php else: ?>
<p>
Detected REST tree support, will use this.
</p>
<?php endif ?>

Hope this is useful.

cheers
Tony
Marble Bay
Tonys Tech Blog

 
kandsten

Joined: 2010-11-26
Posts: 79
Posted: Tue, 2011-05-03 13:18

beerygaz: I'll have a look at that. Will get back to you.

 
kandsten

Joined: 2010-11-26
Posts: 79
Posted: Tue, 2011-05-03 13:20

thowden: Thanks, I'll run some tests and adjust the error messages with some helpful suggestions. The idea is to be present useful info, indeed.

 
S59

Joined: 2011-05-04
Posts: 2
Posted: Wed, 2011-05-04 07:45

I was so close to getting this done.

Under the settings, i receive this error message: "Configration OK, no mod_rewrite support."

I can browse my gallery and when i pick a picture, it returns this error:

Forbidden

You don't have permission to access /blog/wp-admin/media-upload.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I've had my host look at mod_rewrite and it's enabled.

Any help is good.

thanks

 
thowden

Joined: 2003-07-17
Posts: 22
Posted: Wed, 2011-05-04 10:19

Hi

The no mod_rewrite support message is simply saying that the plugin is not being redirected. Most likely your WP install is single user.

The issue will be with permissions. If you have security plugins like ask apache for WP the try disabling those first.

cheers
Tony

Marble Bay
Tonys Tech Blog

 
S59

Joined: 2011-05-04
Posts: 2
Posted: Wed, 2011-05-04 13:58

Thanks, I'll look that up but I'm not sure I'll find anything since I did an install through Fantastico.

 
beerygaz

Joined: 2011-04-29
Posts: 5
Posted: Sun, 2011-05-08 08:43
kandsten wrote:
beerygaz: I'll have a look at that. Will get back to you.

Any news mate? I'm sure I'm just mssing something simple.

 
OC2PS
OC2PS's picture

Joined: 2010-09-08
Posts: 428
Posted: Sun, 2011-05-08 09:24

How does this compare to Heiv G3: http://www.heiv.fr/projets/plugin-wordpress-gallery-3/

SoosKriszta
Csillamvilag.com

Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources

 
kandsten

Joined: 2010-11-26
Posts: 79
Posted: Sun, 2011-05-08 09:52
beerygaz wrote:
kandsten wrote:
beerygaz: I'll have a look at that. Will get back to you.

Any news mate? I'm sure I'm just mssing something simple.

-ENOTIME, but I'm having a catch-up day today, so hopefully Very Soon(tm) :)

 
kandsten

Joined: 2010-11-26
Posts: 79
Posted: Sun, 2011-05-08 09:59
sooskriszta wrote:
How does this compare to Heiv G3: http://www.heiv.fr/projets/plugin-wordpress-gallery-3/

There's a short rundown of the available G3 plugins (that I know of) at http://wordpress.org/extend/plugins/gallery3-picker/faq/ - it boils down to what you want out of Gallery. If you want to simply embed single images, I think G3 Picker is the best option due to speed of browsing, cleaner integration and futureproofing. If you want carousels, heiv is the better option. If you want a swiss army knife, that's the direction GWPG3 is heading.

 
creationsings

Joined: 2008-02-07
Posts: 57
Posted: Thu, 2011-05-12 01:08

So, I have an extra piece of information regarding my present trouble with this plug-in --i.e., nothing loads and I don't see any gallery tree information. It turns out, the problem isn't with my gallery3 install as I assumed (since it's the newest piece of the puzzle on my website)...it actually seems to be a problem with wordpress. I did a clean install of wordpress on my local machine, and entered my real-world gallery3 credentials and REST API key into that testbed. Everything works like a charm. I'm still not sure how to debug...I tried disabling all plugins (except the pre-installed ones) on my wordpress install that's giving me trouble and it doesn't seem to help. I just thought I'd report this in case this new piece of the puzzle helps give someone an idea.

Edit: Okay...I did a clean install of wordpress on my host in a subdirectory and everything worked. So, I think I've found the culprit. I have my main wordpress install such that the "WordPress address (URL)" and the "Site address (URL)" settings are different. So, my wordpress files are installed in a folder under my site root with an index.php file in the root that points where it should go. See: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

This, I believe is what breaks this plugin...Testing on my local testbed seems to confirm it. Any ideas how to fix it?

 
creationsings

Joined: 2008-02-07
Posts: 57
Posted: Thu, 2011-05-12 15:06

Okay. Here's the fix for my problem (ignore my previous post...when I quit last night, I didn't have time to go any further with the debugging).

On line 38 of picker.php change

$plugin_url = get_settings('home').'/wp-content/plugins/'.dirname(plugin_basename(__FILE__));

to

$plugin_url = get_settings('siteurl').'/wp-content/plugins/'.dirname(plugin_basename(__FILE__));

and everything works fine!

Now that I finally have this plug-in working on my site, I'm working on modifying it to give me an option of using the gallery3 embeditem plugin when it generates the links. (I prefer to use that for my links so that I don't have to worry about moving things around in my gallery and breaking links. See: http://codex.gallery2.org/Gallery3:Modules:embeditem) If anyone else is interested in this, let me know and I'll post my code changes. I actually already have it working with hard-coded stuff, but I'd rather have an official flag in the plug-in settings so that the use of embeditem is a changeable option.

 
beerygaz

Joined: 2011-04-29
Posts: 5
Posted: Sun, 2011-05-15 11:02

I tried creationsings suggestion in my own picker.php, but still no joy. Just a "loading.." message and still no pictures.

 
Eyeless

Joined: 2009-04-17
Posts: 14
Posted: Tue, 2011-05-17 05:16

Hi,

your plugin looks quite nice, but I have some trouble getting it running.

After installing the plugin, I put the URL of my gallery3 installation in the options panel next to a description and clicked update options. The application told me that my settings were saved. Now I have a new Tab when insterting new pictures named like my description, but if I select it, it tells me :

Module not configured
Sorry, but your Gallery3 module configuration doesn't seem to work:
No configuration found
Please go here to configure

Do you know what I am doing wrong?

Thanks in advance,
cheers Eyeless

 
jason_
jason_'s picture

Joined: 2011-05-22
Posts: 2
Posted: Fri, 2011-05-27 10:54

I am having the same problem as Eyeless (above). I could be wrong, but perhaps there is something introduced with the latest Wordpress upgrade? I had this working a few weeks ago, then upgraded and had not used the plugin in the interim. Now, I try to use the gallery3 picker, and I get the same error message as above: No configuration found

Any ideas?

-Jason

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Fri, 2011-05-27 20:25

I upgraded to WordPress 3.1.3 on my blog and everything still works fine. So, it would seem that the WordPress upgrade by itself is not a problem. That's not to say that it's not some three-way conflict between WP 3.1.3, this plug-in, and another. Oh I am still running the 3.0.1 version of Gallery and not the newer 3.0.2 version so I don't know what effect if any that would have.

Thanks,
Mark H.

Using Gallery 3.0.1 - gallery.markheadrick.com

 
OC2PS
OC2PS's picture

Joined: 2010-09-08
Posts: 428
Posted: Tue, 2011-06-14 09:44
kandsten wrote:
sooskriszta wrote:
How does this compare to Heiv G3: http://www.heiv.fr/projets/plugin-wordpress-gallery-3/

There's a short rundown of the available G3 plugins (that I know of) at http://wordpress.org/extend/plugins/gallery3-picker/faq/ - it boils down to what you want out of Gallery. If you want to simply embed single images, I think G3 Picker is the best option due to speed of browsing, cleaner integration and futureproofing. If you want carousels, heiv is the better option. If you want a swiss army knife, that's the direction GWPG3 is heading.

I have used both Heiv G3 and G3 Media picker, and can say without hesitation that I much prefer G3 Media picker.

SoosKriszta
Csillamvilag.com

Bodypainting, Facepainting, Glitter, Henna
HennaLap.com

 
Samme

Joined: 2010-01-25
Posts: 1
Posted: Thu, 2011-07-14 12:35

I have a bit of a problem...

All is set up properly (?) but thumbnails isn't showing, but I can still import the images!?

Also when the picture is imported I can see it properly but the plugin "hangs" while inserting it into the post, so I have to abort, then the image is in the "ordinary" Gallery and I can insert it from there.

Any ideas? Kandsten?

 
adherr

Joined: 2011-09-09
Posts: 1
Posted: Fri, 2011-09-09 17:06

I've been banging my head on this for a while: I'm running gallery 3.0+git and WP 3.2.1, with Gallery3 picker 0.9.5. Like S59 above, I get a Forbidden error every time I click on an image from the gallery in the Add an Image dialog. I'm told:

You don't have permission to access /wp/wp-admin/media-upload.php on this server.

I've tried changing permissions of my files on the webhost (HostGator) but no combination I've tried works. Gallery3 Picker is the only plugin I have activated, and mod-rewrite is not active (according to G3picker).

Any ideas?

Thanks,
Andrew