• Resolved Dirk Claesen

    (@dirk-claesen)


    After enabling Ajax as per your advice I can no longer browse to the photos.
    If I use the “user photo” widget for instance, I see all photos posted by the user selected. The breadcrumb displays “user uploaded photos >> photos by <user>”.

    If I click on a photo without having Ajax enabled I see the picture and the breadcrumb changes into “user uploaded photos >> photos by <user> >> <photo name>”.

    If Ajax is enabled and I click on the photo then the breadcrumb changes into “user uploaded photos >> photos by <user> >> photos by <user>” and the photo is not displayed. (Most likely because the path is wrong.)

    Do I need to activate another setting to bypass this?

    https://www.ads-software.com/plugins/wp-photo-album-plus/

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

    (@opajaap)

    You did not wait long enough… Try it on https://wppa.opajaap.nl/

    Thread Starter Dirk Claesen

    (@dirk-claesen)

    I know it is working fine on your website, but I keep having the same issue on my website.

    Can I somehow force the refresh or see when the change is fully applied?

    In the meantime I must have left my website for about an hour after activating ajax, rebooted the server and still have the same problem.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Is it on local host or can you give me a link ( you may mail to me: opajaap at opajaap dot nl )

    Thread Starter Dirk Claesen

    (@dirk-claesen)

    It still on a local host only. I’m not that far yet that I can publish my website already.

    It’s not a critical issue for me. For the time being I’ll continue without Ajax enabled.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    For me it is crucial, i have a second report of this. It ia maybe the statuscode not being 200. I can provide a patch to see waht the statuscode is.

    Thread Starter Dirk Claesen

    (@dirk-claesen)

    If you provide me with the patch, I’ll install it and give you the status code.

    I had a look using the developer tools in Chromium and this is the output.
    Is the 202 that you can see at the end the status code you expected?

    Uncaught TypeError: Cannot call method ‘addEventListener’ of undefined pinit.js:1
    Invalid App Id: Must be a number or numeric string representing the application id. all.js:56
    FB.getLoginStatus() called before calling FB.init(). all.js:56
    Uncaught TypeError: Cannot call method ‘appendChild’ of undefined pinit.js:1
    Uncaught ReferenceError: google is not defined
    (anonymous function)
    (anonymous function) jquery.js?ver=1.10.2:3
    x.extend.globalEval jquery.js?ver=1.10.2:3
    x.fn.extend.domManip jquery.js?ver=1.10.2:4
    x.fn.extend.append jquery.js?ver=1.10.2:4
    (anonymous function) jquery.js?ver=1.10.2:4
    x.extend.access jquery.js?ver=1.10.2:3
    x.fn.extend.html jquery.js?ver=1.10.2:4
    xmlhttp.onreadystatechange wppa.min.js?ver=5-1-17-004:202

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Thank you for this info. 202 is what i needed.

    To test if it works with 202 status, do the following:

    Delete wppa.min.js

    edit wppa.js line 2247:

    // The AJAX rendering routine
    function wppaDoAjaxRender(mocc, ajaxurl, newurl) {
    
    	// Create the http request object
    	var xmlhttp = wppaGetXmlHttp();
    
    	if ( wppaCanAjaxRender ) {	// Ajax possible
    		// Setup process the result
    		xmlhttp.onreadystatechange = function() {
    			if ( xmlhttp.readyState == 4 && xmlhttp.status == 200 ) {

    change to:

    // The AJAX rendering routine
    function wppaDoAjaxRender(mocc, ajaxurl, newurl) {
    
    	// Create the http request object
    	var xmlhttp = wppaGetXmlHttp();
    
    	if ( wppaCanAjaxRender ) {	// Ajax possible
    		// Setup process the result
    		xmlhttp.onreadystatechange = function() {
    			if ( xmlhttp.readyState == 4 ) {

    i.e. remove && xmlhttp.status == 200. This is not a final fix, but adiagnostic! I would like to know if it works under this situstion.

    Thread Starter Dirk Claesen

    (@dirk-claesen)

    Thanks for the tip but it doesn’t seem to solve the problem.
    I still have the same problem and this is the output from the Chromium developer tools.

    Uncaught TypeError: Cannot call method ‘addEventListener’ of undefined pinit.js:1
    a.(anonymous function).f.listen pinit.js:1
    a.(anonymous function).f.behavior pinit.js:1
    a.(anonymous function).f.init pinit.js:1
    (anonymous function) pinit.js:1
    (anonymous function) pinit.js:1
    Invalid App Id: Must be a number or numeric string representing the application id. all.js:56
    FB.getLoginStatus() called before calling FB.init(). all.js:56
    Uncaught TypeError: Cannot call method ‘appendChild’ of undefined pinit.js:1
    a.(anonymous function).f.call pinit.js:1
    a.(anonymous function).f.log pinit.js:1
    (anonymous function) pinit.js:1
    Uncaught ReferenceError: google is not defined
    (anonymous function)
    (anonymous function) jquery.js?ver=1.10.2:3
    x.extend.globalEval jquery.js?ver=1.10.2:3
    x.fn.extend.domManip jquery.js?ver=1.10.2:4
    x.fn.extend.append jquery.js?ver=1.10.2:4
    (anonymous function) jquery.js?ver=1.10.2:4
    x.extend.access jquery.js?ver=1.10.2:3
    x.fn.extend.html jquery.js?ver=1.10.2:4
    xmlhttp.onreadystatechange wppa.js?ver=5-1-17-004:2259

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    The pinit and fb errors are not important here.

    Is the conclusion correct that when the statuscode is 202, we get no pictures?

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    You can now choose between the two ajax ways in Table IV-A1.1.

    Thread Starter Dirk Claesen

    (@dirk-claesen)

    With the status code 202 I didn’t get no pictures indeed.

    I just upgraded to 5.1.18 and without changing any setting it works now.
    Thanks for solving the problem.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    That is because you are now using the admin-ajax.php again. You can switch it to wppa-ajax-front.php on Table IV-A1.1.

    It will probably not work, i don’t know because i do not have the 202 problem.

    I could troubleshoot it better but only when i have a link to a live page showing the problem. Then i can substitute a testing version of wppa.js, edit it until i find a solution. One option would be testing a synchonous ajax call in stead of aynchronous. Important question to this: Does the view counter, and/or rating and/or commenting work with the wppa-ajax-front.php activated? If so, there is a big chance that ajax rendering with synchronous ajax will work…

    Thread Starter Dirk Claesen

    (@dirk-claesen)

    It doesn’t matter if I enable IV-A1.1 or not. It is working in both cases.

    The rating and the comment also work with or without the frontend activated.

    I just noticed the geomapping is no longer working.
    I will start a separate ticket for this.

    Thread Starter Dirk Claesen

    (@dirk-claesen)

    Update: I will not create a separate ticket for the geomapping as I read on your website geodata does not work when ajax is enabled.

    For me this implies I have to disable ajax for the time being.

    (This was the text I wanted to enter in the ticket)
    Instead of the map I see now “[map style=”width: auto; height:300px; margin:0; ” marker=”yes” lat=”51.012339566667″ lon=”5.2389474333333″]”
    I have the text “w#location” in II-B15 (Custom box content) and I have IX-A7.1 and IX-A7.2 enabled.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Enabling Ajax in IV-A1 results in photos not displaying anymore’ is closed to new replies.