Code Monkey home page Code Monkey logo

nanogp2's Introduction

nanogp2

PHP add-on for nanogallery2 for accessing Google Photos content.

Based on the Google Photos API.
Supported content: albums and photos (not videos).
Please note that the Google Photos API has a limit of 10.000 requests per day.

 
 

USE OF THIS APP REQUIRES ADVANCED SKILLS ❗

This app is delivered AS-IS, changes on Google side may break it without any warning.
Use at your own risk.

 
 


▶️ Upgrading from NANOGP to NANOGP2

The API used by nanogp is depreciated by Google and will be turned off on march 2019. A new API is available but the usage is not compatible with the depreciated one.

Migration - step by step:
  1. Install nanogp2 in a new folder (do not install over nanogp)
  2. Configure nanogp2
  3. update nanogallery2 settings in your HTML pages:
    • point google2URL to the new nanogp2 URL, e.g.: 'google2URL': 'https://YOUR_WEB_SERVER/nanogp2/nanogp2.php'
    • album's IDs have changed, update the value of the album parameter, if you use it.


 
 

▶️ Installation

➖ Pre-requisites:
  • Web server with PHP version > 5.4+
  • Cannot be run on localhost
  • nanogallery2 v2.4.1
➖ Installation procedure
  • Create a folder named nanogp2 on your web server.
  • Copy the content of the dist folder in this folder.

You should have a structure with these folders, files and permissions:

     nanogp2              [rwx---r-x]
     │   authorize.php    [rw----r--]
     │   check.php        [rw----r--]
     │   nanogp2.php      [rw----r--]
     │
     └─── admin           [rwx---r-x]
         │   .htaccess    [rw----r--]
         │   config.php   [rw----r--]
         │   tools.php    [rw----r--]
         │
         └─── users       [rwx---r-x]
             │   xxxx     [rwx---r-x]
             │   ...      [rwx---r-x]

 

 
 

▶️ Enable Google API - Google API Console

  1. For your nanogp2 installation, you need to register your instance using the Google API Console.
    • create a new project called nanogallery2gp-YOUR-INSTANCE-NAME (the project name should be unique, so replace YOUR-INSTANCE-NAME with the name of your own instance)
    • create a OAuth consent screen
      • application name: nanogallery2gp-YOUR-INSTANCE-NAME
      • set the support email
      • add scopes: email, profile, openid
      • authorized domains: name of the domain where your nanogp2 is installed
    • create credentials kind OAuth Client ID
      • application type: Web application
      • name: nanogallery2gp-YOUR-INSTANCE-NAME
      • Authorized redirect URIs: set the full path to your authorize.php (once with http, and once with https)
  2. Google then provides information you'll need later, such as a client ID and a client secret.
  3. Activate the Google Photos Library API in the Google API Console. (If the API isn't listed in the API Console, then skip this step).

 
 

▶️ Configuration

Settings are defined in admin/config.php:

  $cfg_client_id     = 'yyy';
  $cfg_client_secret = 'zzz';
  $albums_filter     = ['sauvegarde', 'backup'];

Client ID ($cfg_client_id) and client secret ($cfg_client_secret) can be obtained from the Google API Console.
$albums_filter is used to filter albums out. Albums with a title containing one of the string will not be displayed.

Client secret should never be shared ❗ . Only your nanogp2 installation should access it.


 
 

▶️ User authorization

 

➖ Grant authorization

  1. Once the settings are defined, you need to grant authorization to nanogp2 to access your Google Photos account.
  2. Use a browser and open the authorize.php page: https://YOUR_WEB_SERVER/nanogp2/authorize.php
  3. Google displays a consent screen, asking you to authorize your instance of nanogp2 to request some of your data. If you get a warning message This app isn't verified, you need to display the advanced options to grant authorization to your nanogp2 instance.

At the end of the process:

  • your user-ID is displayed. This value should be set in your nanogallery2's options (userID).
  • a folder named like your user-ID has been created in nanogp2/admin/users. It contains the files profile.txt, token_a.txt and token_r.txt. Never delete these files.

(if you've granted authorization and if you want to grant authorization again, follow the steps from the section Manually revoke authorization).

 

➖ nanogallery2 parameters

After authorization is granted, from your browser, open the authorize.php page again to display the parameters for nanogallery2.

 

➖ Security

The admin folder should only be accessible to your PHP applications, and not from a browser.
For this, you may for example put an .htaccess file containing deny from all.

 

➖ Manually revoke authorization


 
 

▶️ CONFIDENTIALITY

All your photos albums can by accessed by nanogp2. This may be misused by malicious people.
Please use nanogp2 only with a Google Photos account which does not contain any personal or privat data.

  • USE A DEDICATED GOOGLE PHOTOS ACCOUNT
  • configure the option $albums_filter to protect your privacy

 
 

▶️ Retrieve one user's list of albums

Command to generate a report with the list of album's names and IDs for one specific user:
https://YOUR_WEB_SERVER/nanogp2/nanogp2.php?nguserid=USER_ID&report

Replace YOUR_WEB_SERVER and USER_ID with the correct values for your nanogp2 instance.

For security reason, the report is generated in the user's folder on the server (nanogp2/admin/users/USER_ID/google_photos_data.txt).

Note: this report is only for your information and is not used by nanogallery2.

nanogp2's People

Contributors

kris-b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

krkeegan mklkj

nanogp2's Issues

Error 500 "Could not retrieve Google data" with PHP 7.4

I went through all the steps to connect nanogp2 with Google Photos successfully but whenever I run something by using the nanogp2.php I get an error 500 like this:

nanogallery2: Could not retrieve Google data. Error: error,  readyState=4
    getResponseHeader=function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t}
    getAllResponseHeaders=function(){return c?a:null}
    setRequestHeader=function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this}
    overrideMimeType=function(e){return null==c&&(h.mimeType=e),this}
    statusCode=function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this}
    abort=function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}
    state=function(){return r}
    always=function(){return o.done(arguments).fail(arguments),this}
    catch=function(e){return i.then(null,e)}
    pipe=function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()}
    then=function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new="" typeerror("thenable="" self-resolution");l="e&amp;&amp;(&quot;object&quot;==typeof" e||"function"="=typeof" e)&&e.then,g(l)?i?l.call(e,a(o,n,i,i),a(o,n,w,i)):(o++,l.call(e,a(o,n,i,i),a(o,n,w,i),a(o,n,i,n.notifywith))):(r!="=I&amp;&amp;(s=void" 0,u="[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&amp;&amp;w.Deferred.exceptionHook(e,c.stackTrace),t+1">=o&amp;&amp;(r!==W&amp;&amp;(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&amp;&amp;(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()}
    promise=function(e){return null!=e?w.extend(e,i):i}
    progress=function(){return o&amp;&amp;(n&amp;&amp;!t&amp;&amp;(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&amp;&amp;l.has(r)||o.push(r):r&amp;&amp;r.length&amp;&amp;"string"!==x(r)&amp;&amp;t(r)})}(arguments),n&amp;&amp;!t&amp;&amp;u()),this}
    done=function(){return o&amp;&amp;(n&amp;&amp;!t&amp;&amp;(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&amp;&amp;l.has(r)||o.push(r):r&amp;&amp;r.length&amp;&amp;"string"!==x(r)&amp;&amp;t(r)})}(arguments),n&amp;&amp;!t&amp;&amp;u()),this}
    fail=function(){return o&amp;&amp;(n&amp;&amp;!t&amp;&amp;(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&amp;&amp;l.has(r)||o.push(r):r&amp;&amp;r.length&amp;&amp;"string"!==x(r)&amp;&amp;t(r)})}(arguments),n&amp;&amp;!t&amp;&amp;u()),this}
    responseText=
    status=500
    statusText=error
    URL:https://domain.tld/nanogp2/nanogp2.php?nguserid=1043523540641907022472&amp;alt=json&amp;v=3&amp;kind=album&amp;rnd=1630498081819 [nanogallery2]</o)){if((e=r.apply(s,u))===n.promise())throw>

nanogp2 - installation check

PHP version: 7.4.22
Free disk space: 199773024256

Even if I just want to run the report I get an error 500

Error: could not get a new access token: 503

Hello, I really want to launch this gallery.
I installed nanogallery2 and nanogp2 on my web server and completed all the steps as I know. What I am trying to achieve is google photos albums, but then I load a template I get this error.

What causes this, can I get some help, please?

Error when trying to load albums

Hi,

I followed every step described in the readme, but no album is being loaded. I keep running into this error:

nanogallery2: Could not retrieve Google data. Error: parsererror, SyntaxError: Unexpected token < readyState=4
getResponseHeader=function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b}
getAllResponseHeaders=function(){return 2===t?e:null}
setRequestHeader=function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this}
overrideMimeType=function(a){return t||(k.mimeType=a),this}
statusCode=function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this}
abort=function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}
state=function(){return c}
always=function(){return e.done(arguments).fail(arguments),this}
then=function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}
promise=function(a){return null!=a?n.extend(a,d):d}
pipe=function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}
done=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
fail=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
progress=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
complete=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
success=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
error=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
responseText=
Fatal error: Maximum execution time of 30 seconds exceeded in /home/keeken23/domains/hopsjlokkers.nl/public_html/nanogp2/nanogp2.php on line 142

status=200
statusText=OK

Am I missing something? I created a test page on https://www.hopsjlokkers.nl/test.php

Kind regards,

Rick

Nouvelles autorisations google API

Bonjour,
Comme indiqué, j'ai créé une nouvelle autorisation API semblable à l'ancienne, mais commençant par nanogallery2gp, pour laquelle j'avais obtenu le consentement.
Actuellement, lorsque je lance l'URL : http://prod.chasse-autreches.xyz/nanogp2/authorize.php
j'obtiens le message suivant :
400. C'est une erreur.
Erreur: invalid_request
Valeur de paramètre non valide pour redirect_uri: Autorité manquante: http: ///nanogp2/authorize.php
Mon dossier nanogp2 est bien présent chez l'hébergeur et son dossier config.php bien renseigné.
Je ne comprends pas l'origine de mon erreur.
Pouvez-vous m'aider. D'avance, merci.

Error 504 (timeout) during loading of images.

Hello,

I created a docker-image for nanogp2 (https://cloud.docker.com/u/joshuabeny/repository/docker/joshuabeny/nanogp2).
But the issue has nothing to do with this. It was already in my old installation. I tried now with the docker image to run nanogp2 on an own subdomain because I use it for more than one website. So I tested a new installation with the latest version of nanogp2. But this seems not to resolve the issue.

The authorization of the accounts works perfectly. But if I want to use any google album with nanogallery2 it loads 1 minute and afterwards following error Message appears:

nanogallery2: Could not retrieve Google data. Error: error, error readyState=4
getResponseHeader=function(a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b}
getAllResponseHeaders=function(){return 2===t?e:null}
setRequestHeader=function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this}
overrideMimeType=function(a){return t||(k.mimeType=a),this}
statusCode=function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this}
abort=function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}
state=function(){return c}
always=function(){return e.done(arguments).fail(arguments),this}
then=function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}
promise=function(a){return null!=a?n.extend(a,d):d}
pipe=function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}
done=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
fail=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
progress=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
complete=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
success=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
error=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
status=404
statusText=error


URL:https://MYHOST/nanogp2.php?nguserid=MYUSERID&ngalbumid=MYALBUMID&alt=json&v=3&kind=photo& [my_nanogallery]

In the developer console of the browser, I see an error 504 - Gateway Timeout.

In the logs.txt it is really strange that it always tries to obtain a new access token for a minute.

...
[21/Sep/2019:18:33:04] new access token obtained - MYUSERID
[21/Sep/2019:18:33:04] new access token obtained - MYUSERID
[21/Sep/2019:18:33:04] new access token obtained - MYUSERID
[21/Sep/2019:18:33:05] new access token obtained - MYUSERID
[21/Sep/2019:18:33:05] new access token obtained - MYUSERID
[21/Sep/2019:18:33:05] new access token obtained - MYUSERID
[21/Sep/2019:18:33:05] new access token obtained - MYUSERID
[21/Sep/2019:18:33:05] new access token obtained - MYUSERID
[21/Sep/2019:18:33:06] new access token obtained - MYUSERID
[21/Sep/2019:18:33:06] new access token obtained - MYUSERID
[21/Sep/2019:18:33:06] new access token obtained - MYUSERID
[21/Sep/2019:18:33:06] new access token obtained - MYUSERID
[21/Sep/2019:18:33:06] new access token obtained - MYUSERID
[21/Sep/2019:18:33:07] new access token obtained - MYUSERID
[21/Sep/2019:18:33:07] new access token obtained - MYUSERID
[21/Sep/2019:18:33:07] new access token obtained - MYUSERID
[21/Sep/2019:18:33:07] new access token obtained - MYUSERID
[21/Sep/2019:18:33:07] new access token obtained - MYUSERID
[21/Sep/2019:18:33:08] new access token obtained - MYUSERID
[21/Sep/2019:18:33:08] new access token obtained - MYUSERID
[21/Sep/2019:18:33:08] new access token obtained - MYUSERID
[21/Sep/2019:18:33:08] new access token obtained - MYUSERID
[21/Sep/2019:18:33:09] new access token obtained - MYUSERID
...

I already tried to revoke and reauthorize my user. This didn't help. I also tried another google account with only a few albums, but this one also did not work.

I hope you could help me fix the issue.

Authroize 404 error

Hi, I was trying to authroize my gallery to my website but after clicking allow on the google permissions, when i get redirected back to my website, i get a 404 error despite the redirect URI setup correctly. Your assistance with this would be highly appreciated.

Thanks

Use authorize.php for multi domains

I'm trying to use Nanogp2 in a multi-domain environment. It works, my Photo Gallery is shown like before. However, Nanogp2 is in a shared directory. Is it possible to use authorize.php for different users? I know Nanogp worked like that as I just migrated to Nanogp2, but Nanogp2 is always using my authorization and not creating new ones for new users. Is it even possible?

Nanogallery2 and PHP 8.1

Does this version of Nanogallery2 still work with Google Photos and PHP 8.1? We've moved to a new server with PHP 8.1 and Nanogallery2 is having problems. It worked on your old server with a lower PHP version.

nanogallery2: Could not retrieve Google data. Error: error, error readyState=4

Difficulté avec l'Autorisation

Bonjour,
J'ai bien récupéré mon ID utilisateur après affichage de "Cette application n'est pas vérifiée".
J'ai également obtenu la liste des albums sur le serveur dans "users".
Je peux bien visionner les albums qui ont été traités selon ces nouveaux codes.
Le problème vient de la récupération des listes d'albums ; lorsque je demande une nouvelle liste (après avoir supprimé l'ancienne), j'ai ce message d'erreur : [{"nano_status":"error","nano_message":"Missing access token. Please grant authorization."}] et je ne peux plus poursuivre mes mises à jour.
D'avance merci de votre aide.

Error after authorization

After we have authorize the Api. we are not getting user id screen instead getting following error

Error. Page cannot be displayed. Please contact your service provider for more details. (20)

mail from Google about 'inactive registered OAuth URIs'

Hi,

Recently I received a mail from Google Developers nanogp2, being inactive and/or not in compliance with Google's OAuth URI validation rules. I wonder if I have to worry / take action / ...

MAIL SUBJECT
[Action Advised] Inactive registered OAuth URIs for your project(s) will be removed from Google Developer Console by July 12, 2021, for non-compliance with URI validation rules

MAIL BODY
We are writing to let you know that you have inactive OAuth redirect URIs and JavaScript origins in your Google Cloud project that are not in compliance with Google’s OAuth URI validation rules.

  • On July 12, 2021, we will remove all inactive URIs that are invalid.
  • On September 13, 2021, we will remove all URIs that are not in compliance with redirect URIs and Javascript origins rules (including formerly inactive URIs trying to become active).

What do I need to do to be compliant?

  • If these inactive OAuth redirect URIs and JavaScript origins are no longer needed, you can remove them from your Google Cloud project. If they remain inactive, they will be automatically deleted after July 12, 2021.
  • If your app still needs to use these URIs, please update your app and OAuth configuration from the Google Developer Console to use redirect URIs or JavaScript origins that are compliant with the OAuth URI validation rules by September 13, 2021.

The following Google Cloud project(s), which has/have registered OAuth redirect URIs and JavaScript origins without usage for over 90 days, and which will be removed by July 12, 2021:

Project ID: nanogallery2gp-...
Client: ...-...apps.googleusercontent.com
URI: http://.../nanogp2/authorize.php
URI: http://.../nanogp2/authorize.php
If you have any questions or concerns regarding these changes, please review the documentation provided above in this email.

Sincerely,

The Google Developer Team

Gallery takes long to load.

Hi,

After updating my gallery to use nanogp2 the load time of the gallery seems to have drastically increased. The gallery used to load much quicker with the previous version. I also setup the gallery to just load the first 10 rows and have a more button to increase the performance, however it still takes long to load.
I did record the performace while the gallery was loading and noticed that their is multiple records for Recalculating style and applying style changes.

2019-03-26_13h51_10
2019-03-26_13h51_27
2019-03-26_13h51_42

Your help with this would be highly appreciated.

nanogp2 error: Cannot read property 'openSearch$startIndex' of undefined

I am trying to use nanogp2 along with nanogallery2 and I have followed all steps describe on this Github page, authorization was successful, but when I opened my gallery page I saw the following error on Chrome (dev) console (shown further down) and nothing is shown on my gallery page. Below is the html markup on my gallery page. Any idea?

<div id="nanogallery2" data-nanogallery2='{ "kind": "google2", "userID": "<obscured>", "album": "<obscured>", "google2URL": "http://my.domain.com/nanogp2/nanogp2.php", "thumbnailHeight": 150, "thumbnailWidth": "auto" }'></div>

jquery.nanogallery2.data_google2.min.js:10 Uncaught TypeError: Cannot read property 'openSearch$startIndex' of undefined
at Object.success (jquery.nanogallery2.data_google2.min.js:10)
at u (jquery-3.3.1.min.js:2)
at Object.fireWith [as resolveWith] (jquery-3.3.1.min.js:2)
at k (jquery-3.3.1.min.js:2)
at XMLHttpRequest. (jquery-3.3.1.min.js:2)
(anonymous) @ jquery.nanogallery2.data_google2.min.js:10
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
k @ jquery-3.3.1.min.js:2
(anonymous) @ jquery-3.3.1.min.js:2
load (async)
send @ jquery-3.3.1.min.js:2
ajax @ jquery-3.3.1.min.js:2
w.(anonymous function) @ jquery-3.3.1.min.js:2
getJSON @ jquery-3.3.1.min.js:2
s @ jquery.nanogallery2.data_google2.min.js:10
i @ jquery.nanogallery2.data_google2.min.js:10
jQuery.nanogallery2.data_google2 @ jquery.nanogallery2.data_google2.min.js:10
ia @ jquery.nanogallery2.min.js:22
m @ jquery.nanogallery2.min.js:21
initiateGallery2 @ jquery.nanogallery2.min.js:25
d.init @ jquery.nanogallery2.min.js:25
a.nanogallery2 @ jquery.nanogallery2.min.js:25
(anonymous) @ jquery.nanogallery2.min.js:26
each @ jquery-3.3.1.min.js:2
each @ jquery-3.3.1.min.js:2
jQuery.fn.nanogallery2 @ jquery.nanogallery2.min.js:26
(anonymous) @ jquery.nanogallery2.min.js:41
l @ jquery-3.3.1.min.js:2
c @ jquery-3.3.1.min.js:2
setTimeout (async)
(anonymous) @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
fire @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
ready @ jquery-3.3.1.min.js:2
_ @ jquery-3.3.1.min.js:2

jquery.nanogallery2.min.js:25 Uncaught TypeError: Cannot read property 'baseEltID' of undefined
at String.a.NanoConsoleLog (jquery.nanogallery2.min.js:25)
at a.NanoAlert (jquery.nanogallery2.min.js:25)
at jquery.nanogallery2.data_google2.min.js:10
a.NanoConsoleLog @ jquery.nanogallery2.min.js:25
a.NanoAlert @ jquery.nanogallery2.min.js:25
(anonymous) @ jquery.nanogallery2.data_google2.min.js:10
setTimeout (async)
i @ jquery.nanogallery2.data_google2.min.js:10
jQuery.nanogallery2.data_google2 @ jquery.nanogallery2.data_google2.min.js:10
ia @ jquery.nanogallery2.min.js:22
m @ jquery.nanogallery2.min.js:21
initiateGallery2 @ jquery.nanogallery2.min.js:25
d.init @ jquery.nanogallery2.min.js:25
a.nanogallery2 @ jquery.nanogallery2.min.js:25
(anonymous) @ jquery.nanogallery2.min.js:26
each @ jquery-3.3.1.min.js:2
each @ jquery-3.3.1.min.js:2
jQuery.fn.nanogallery2 @ jquery.nanogallery2.min.js:26
(anonymous) @ jquery.nanogallery2.min.js:41
l @ jquery-3.3.1.min.js:2
c @ jquery-3.3.1.min.js:2
setTimeout (async)
(anonymous) @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
fire @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
ready @ jquery-3.3.1.min.js:2
_ @ jquery-3.3.1.min.js:2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.