Support » Plugin: WP Photo Album Plus » WP Photo Album Plus – Rating does not work without logging in

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Jacob N. Breetvelt


    The window i see asking for login details when i click on a thumbnail in the above link is not from wppa. You have a plugin or theme setting that makes the message ‘secure directory’ ???

    Frontend upload when not logged in requires the owner of the albums where uploads may be done by anyone to be set to —public—

    The upload switch for the roles refers to backend uploading.

    Plugin Author Jacob N. Breetvelt


    In particular, did you protect the wp-admin/ folder?
    If so, remove the protection or uncheck Table IV-A1: Use Ajax.

    Even front-end ajax operations use …/wp-admin/admin-ajax.php. This is a wp inconsistency.

    Hi there,
    Thank you very much for you help. I still have managed it. Will try properly this weekend.
    Thanks again,

    i have the same problem as described above.
    As you can see at it’s not possible for an anonymous user to rate for a photo.

    I unchecked the IV-E-1 and it’s still unavailable.
    When i open this web page, an error occurs : “TypeError : avg is undefined” wwpa.min.js:116

    Thanks in advance !

    EDIT : i activated the debug of WPPA, i have in red :

    [WPPA+ dbg msg: Lang=, Locale=fr_FR, Ajax=]
    [WPPA+ dbg msg: Usr_upl entered]

    [WPPA+ dbg msg: Get thumbs took 0.00058197975158691 seconds.]

    [WPPA+ dbg msg: Filmstrip took 0.0032320022583008 seconds.]

    [WPPA+ dbg msg: SlideInfo took 0.0027580261230469 seconds.]

    Plugin Author Jacob N. Breetvelt


    Unfortunately you switched debug off again…

    What is the plugin onet session code ? I can not find it in the WP plugins section. Switch it off and try again.

    thanks for this quick answer.
    i try to switch off the “Onet Session Code” plugin (own dev), but nothing change.

    Could you tell me how you find the list of installed wp plugins on this webiste ?
    i can reactivate the debug of WPPA, if needed ?

    Plugin Author Jacob N. Breetvelt


    If you switch debug on again, and add ?debug to the addressline in the browser, you get wppa+ dbg messages.
    At the bottom of the page you get something like this:

    [WPPA+ dbg msg: Active Plugins]
    [WPPA+ dbg msg: capsman/capsman.php]
    [WPPA+ dbg msg: cubepoints/cubepoints.php]
    [WPPA+ dbg msg: database-performance-monitor/databaseperformance.php]
    [WPPA+ dbg msg: google-maps-gpx-viewer/google-maps-gpx-viewer.php]
    [WPPA+ dbg msg: jetpack/jetpack.php]
    [WPPA+ dbg msg: qtranslate/qtranslate.php]
    [WPPA+ dbg msg: shortcode-plugin-download-counter/shortcode-plugin-download-counter.php]
    [WPPA+ dbg msg: sidebar-login/sidebar-login.php]
    [WPPA+ dbg msg: simple-cart-buy-now/scabn.php]
    [WPPA+ dbg msg: toolbar-theme-switcher/toolbar-theme-switcher.php]
    [WPPA+ dbg msg: tweak-option/tweak-option.php]
    [WPPA+ dbg msg: ultimate-tinymce/main.php]
    [WPPA+ dbg msg: wp-download-counter-plus/wpdc.php]
    [WPPA+ dbg msg: wp-memory-db-indicator/wp-memory-db-indicator.php]
    [WPPA+ dbg msg: wp-photo-album-plus/wppa.php]
    [WPPA+ dbg msg: End Active Plugins]

    and that is exactly what i wanted to see ( from your site, evidently ).

    A question:

    what are your settings in Table IV_E 1..6 ?

    thanks a lot for your reactivity !

    i reactivate the debug option.

    i got first (bold for red color font) :
    [WPPA+ dbg msg: %%wppa%% found]
    [WPPA+ dbg msg: Text: %%wppa%% %%slide=5%% %%align=cen]
    [WPPA+ dbg msg: Doit is on]
    [WPPA+ dbg msg: Entering wppa_albums]
    [WPPA+ dbg msg: Lang=, Locale=fr_FR, Ajax=]
    [WPPA+ dbg msg: Usr_upl entered]

    [WPPA+ dbg msg: Searchstring is not set]
    [WPPA+ dbg msg: Plugin load time :0.003s.]
    [WPPA+ dbg msg: Init runtime time :0.000s.]
    [WPPA+ dbg msg: Num queries before wppa :42]
    [WPPA+ dbg msg: get_thumbs entered: 1]
    [WPPA+ dbg msg: Get thumbs took 0.00053787231445312 seconds.]
    [WPPA+ dbg msg: From theme: #thumbs=1]
    [WPPA+ dbg msg: Running slidecontainer type slideshow with 1 elements in thumbs, is_single=0]
    [WPPA+ dbg msg: SlideInfo took 0.002655029296875 seconds.]
    [WPPA+ dbg msg: Time elapsed occ 1:0.006s. Tot:0.006s.]
    [WPPA+ dbg msg: Nuber of queries occ 1:10]
    [WPPA+ dbg msg: Cumulative query statistics: Q=query, G=cache
    Q201=>1, Q27=>1, Q33v=>1, Q59=>1, Q90=>1,
    G90=>2, G91=>12,
    Total queries attempted: 19, Cash hits: 14, equals 73.68%]

    AND ;

    [WPPA+ dbg msg: Cumulative query statistics: Q=query, G=cache
    Q201=>1, Q27=>1, Q33v=>1, Q59=>1, Q90=>4,
    G90=>4, G91=>61,
    Total queries attempted: 73, Cash hits: 65, equals 89.04%]
    [WPPA+ dbg msg: Active Plugins]
    [WPPA+ dbg msg: contact-form-7/wp-contact-form-7.php]
    [WPPA+ dbg msg: flamingo/flamingo.php]
    [WPPA+ dbg msg: onet-session-code/onet-session-code.php]
    [WPPA+ dbg msg: polylang/polylang.php]
    [WPPA+ dbg msg: wp-photo-album-plus/wppa.php]
    [WPPA+ dbg msg: wp-session-manager/wp-session-manager.php]
    [WPPA+ dbg msg: End Active Plugins]
    [WPPA+ dbg msg: Usr_upl entered]

    For the IV E :
    1 => not checked
    2 => checked
    3 => checked
    4 => -5
    5 => checked
    6 => 50 (%)

    Plugin Author Jacob N. Breetvelt


    Don’t bother about the colors, its just for me to find them quickly but it has no special meaning.

    I checked and double checked it on my test site: but it works correctly there with the same settings as you have.

    Most likely there is a conflict with another plugin, try de-activating them to find out which one. Then i can see if i can find a work around for the conflict.

    I de-activate all extensions, except Polylang. Is there some confilct whith this one ? (i can’t do this, or i have to set all the website)

    Have you seen this javascript error : “Uncaught TypeError: Cannot call method ‘split’ of undefined “
    line 116 of wppa.min.js

    function _wppaSetRatingDisplay(mocc){var idx,avg,tmp,cnt,dsc,myr,dsctxt;if(!document.getElementById('wppa-rating-'+mocc))return;avg=_wppaAvg[mocc][_wppaCurIdx[mocc]];tmp=<strong>avg.split</strong>('|');avg=tmp[0];cnt=tmp[1];dsc=_wppaDisc[mocc][_wppaCurIdx[mocc]];myr=_wppaMyr[mocc][_wppaCurIdx[mocc]];if(wppaRatingDisplayType=='graphic'){_wppaSetRd(mocc,avg,'#wppa-avg-');_wppaSetRd(mocc,myr,'#wppa-rate-');if(myr==0){jQuery('#wppa-dislike-'+mocc).css('display','inline');jQuery('#wppa-dislike-imgdiv-'+mocc).css('display','inline');jQuery('#wppa-filler-'+mocc).css('display','none');jQuery('#wppa-dislike-'+mocc).stop().fadeTo(100,wppaStarOpacity);}

    Plugin Author Jacob N. Breetvelt


    Yes. I love those descriptive errormessages. However the problem is that i can not imagine how this can ever happen.
    It would mean that _wppaAvg[mocc][_wppaCurIdx[mocc]] is also undefiend etc…

    Higher up in the code it reads ( where the array is filled with data ):

    _wppaAvg[mocc][id] = avgrat;
    while avgrat is an argument of wppaStoreSlideInfo(), that is filled by the php routien wppa_get_slide_info(), which is performed properly otherwise you would not have the slide anyway. See this line from your pages source:

    wppaStoreSlideInfo('1','0','/7.jpg?ver=1',' max-width:640px; max-height:480px; width:640px; height:480px;margin:0;','640','480','Origami de Renée CASTAGNO','Origami de Renée CASTAGNO','Représentation du logo Onet en 3D\nCette œuvre est réalisée afin de mettre en avant le nouveau logo d\'Onet.','7','|0','0','0','','','','','0','','','','','','');

    where the argument '|0' is avgrat.
    '|0' is splittable into an empty string and value 0, i.e. NOT undefined…

    I could fix avg itsself by testing if it is defined, but that is not the cause of the problem, and what would the content be then?

    There must be some mechanism that interferes somehow with these js functions. The exact situation ( except for your extra plugins ) runs without problems on my site, even with a one image slideshow, like yours:

    A tip for troubleshooting:

    You can delete wppa.min.js using ftp. It then loads wppa.js ( not minified ). This makes it easier to locate a js problem.

    I just installed and activated polylang, a short test did not show it to be the problem.

    Did you know that wppa+ supports qTranslate fully?

    Temporary try de-activating all other plugins and/or test it on another theme to eliminate. If there might be an error in your download of wppa+, try deleting the plugin and re-install from the plugins page. You will never loose anything from wppa+ when removing the plugin.



    thanks for your help !
    I did all what you offer :

    • change the theme (Twenty-twelve orginal, Twenty three)
    • de-active all extensions
    • re-install WPPA+

    and there is no change…
    I do not know what i can test now ?



    i find the problem, but not how to correct it !
    When the slideshow is on, it’s impossible to rate. But if you stop it, all it’s ok !!
    You can test it here :

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘WP Photo Album Plus – Rating does not work without logging in’ is closed to new replies.