Home › Forums › Publish on Gallery 3 › Failed to Retrieve Gallery Data
This topic contains 6 replies, has 2 voices, and was last updated by Tomek 11 months ago.
-
AuthorPosts
-
April 13, 2012 at 5:28 pm #1644
JastroI select some photos to upload and start this app.
Fill inn Gallery url, user key and click “Download Album Info”.
Then the error listed below pops up.
What does this tell me and how can I get passed it?Regards
Jastro
“Failed to Retrieve Gallery Data”
:
Exception Error reading JObject from JsonReader.Trace: ved Newtonsoft.Json.Linq.JObject.Load(JsonReader reader)
ved Newtonsoft.Json.Linq.JObject.Parse(String json)
ved
PublishOnGallery3DataModel.ItemData.ConvertJSONToItemData(String jsonString)
ved PublishOnGallery3DataModel.ItemData.ctor(String jsonString)
ved
GalleryInterface.Gallery3InterfaceManager.RetrieveGalleryData()
ved
GalleryInterface.GalleryInterfaceManager.ReloadGalleryData()April 16, 2012 at 9:32 am #1670Hi Jastro,
It seems there is either something wrong with interpreting the response coming from the your Gallery3 installation, or there is an error with the JsonReader loading.
First, are you sure you are running .NET 4.0 on your computer? What operating system version is it? While the plugin “should” be compatible with 3.0, I run 4.0 and so I can only test it with that.
If it is not an issue with .NET 4.0, then to check what is happening, we’ll need to get at the original information that the plugin would be seeing from your Gallery install. Please see my instructions for debugging the connection in this forum post: http://kott.fm/tomek/forums/topic/unhandled-exception-when-download-album-info/#post-1269.
What I would need is the entire contents of http://YOURURL.com/gallery3/rest/item/1?type=album&output=html (replace yoururl.com/gallery3 with the URL and path to where you would usually look for your Gallery. Don’t include any “index.php” if it is there).
You can either post it here or email me at my first name @ this site’s url.
Thanks,
Tomek
April 18, 2012 at 3:25 pm #1692
JastroHi,
Thanks for your feedback and suggestion for solving my problem.
I’m running WLPG on Win7 ultimate x64 and Gallery 3 on WHS 2011.
So I don’t think its a .net 4 issue, that is in place both on my client and server.
I have also tried your other tips and links, but they only result in a 404 error.
My Gallery 3 site is only accessable with https and not http.
Maybe this is part of the problem?Regards
Jastro
April 19, 2012 at 11:10 am #1700Jastro:
I have also tried your other tips and links, but they only result in a 404 error.
My Gallery 3 site is only accessable with https and not http.
Maybe this is part of the problem?Well the plugin doesn’t care about https vs. http. That said, I don’t know of anyone else who has tried with only an https channel, so let’s make sure there is nothing going wrong on the server end.
When you say “I have also tried your other tips and links, but they only result in a 404 error.”, do you mean they result in 404 even if you use “https”? If we cannot get at the JSON data through the browser, there’s no chance that the plugin in windows photo gallery will work, so we need to get that working.
I assume that your host URL is “example.com”. Further, I assume that your gallery installation is in a folder “gallery3″. Then, your links would look something like “https://www.example.com/gallery3/rest/item/1/?type=album&output=html”. To ensure that you are using the right URL, first make sure that you can see your gallery via “htps://www.example.com/gallery3/” bit. If that works, then try the previous url.
If you successfully installed the plugin mentioned in my first reply, and have the REST key, then the url with “rest/item/1/…” should return a table of information in JSON format. If you do not have the right headers, then you should simply see “[ ]” as the reply. If your gallery3 setup is not working correctly, then you will see a 404.
One note: URL rewriting is necessary in the current plugin. If you are running this on WHS2011, I’m not sure what your options are. Perhaps this would help: http://stackoverflow.com/questions/8952474/converting-gallery3-htaccess-mod-rewrite-code-to-iis-url-rewrite-in-web-config.
Please let me know how your tests come out. If you tried all of that already, please let me know which test failed.
Tomek
April 19, 2012 at 5:40 pm #1702
JastroThis link helped:
http://stackoverflow.com/questions/8952474/converting-gallery3-htaccess-mod-rewrite-code-to-iis-url-rewrite-in-web-config.Used the web.config file from this page and things worked much better
Now I can use the plug-in and upload photos, but even it says its successfull I dont find the photos in the gallery
Regards
Jastro
April 20, 2012 at 12:29 pm #1710Jastro:
Now I can use the plug-in and upload photos, but even it says its successfull I dont find the photos in the gallery
Darn! That is a different problem that I haven’t seen…I’m wondering if it has something to do with the Windows server being used. A couple of things to try and questions:
1) Can you confirm that you can upload a photo successfully using the built in uploader in Gallery3? I think this is the closest action to the upload from the WLPG plugin.
2) If possible, can you turn off https, and see if the plugin works with http instead? If it works with one and then the other, then we have at least a lead to go on!
3) The following is very silly: are you sure you uploaded the photos to the album you though you did? If possible, you could create a test album in the root album, and upload to that.
4) I assume your account (from which you took the REST id), has access to edit albums and upload photos: can you confirm that this is the case?
5) When uploading the photos through the plugin, does the upload take an appropriate amount of time? That is, if you uploaded the same photo through the built-in interface, and it took a minute, does it also take about a minute to upload through the plugin?
Please let me know the answer to those questions and we’ll keep troubleshooting from there!
Tomek
April 27, 2012 at 3:35 pm #1800For posterity, the issue was diagnosed as a wrong php.ini problem:
The problem was traced back to php.ini settings. By uploading with the normal “Add” button I realized the picture was too big.
upload_max_filesize = 2MChanged that to 10M and problem solved.
Glad it works!
-
AuthorPosts