• Resolved Willy Bahuaud

    (@willybahuaud)


    I’ve a very strange bug on an installation with 2 websites:

    When I do an ajax request to admin-ajax.php from the root theme, the function used for the response is located in the other one…

    I don’t understand why ?? How can I solve this ?

    Can admin-ajax.php detect the refering theme ?

Viewing 9 replies - 1 through 9 (of 9 total)
  • So Willy, I think that you can try to disconnect one of them …

    Thread Starter Willy Bahuaud

    (@willybahuaud)

    Yes, I just tried. I disconnected the two sites, this does not change …

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Are you using Multisite or is this just a multiple theme question?

    Thread Starter Willy Bahuaud

    (@willybahuaud)

    Yes, it’s a multisite installation, with 2 website (which use different themes) inside.

    Hi Willy,
    Some questions for you:
    Can you tell us which WP version it is?
    Are your themes custom ones or did you buy them somewhere? What are those themes?
    I suppose your Ajax requests work well in the admin area? (for example, approve a comment)
    Do you know the params sent with your request?

    Thread Starter Willy Bahuaud

    (@willybahuaud)

    I use the 3.3.1 version and I use 2 custom theme quite similar. I don’t know because I don’t use ajax requests in admin area…

    In the request parameters : “action” => Name of my function (sendformparcours) and others serialized values obtain by the form.

    I use ajax type POST, with jQuery.

    Thread Starter Willy Bahuaud

    (@willybahuaud)

    It seem admin-ajax load the wrong function file… ,maybe because it doesn’t know wich “functions.php” it have to load. Can I force it to use one of the theme ?

    Thread Starter Willy Bahuaud

    (@willybahuaud)

    I got another ajax request which work perfectly on the right theme…

    This makes me think that the application does not work is performed on a site page loaded in an iframe.

    Is this an important detail?

    Thread Starter Willy Bahuaud

    (@willybahuaud)

    I solved it, but I dont know how… ^^

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Pb with ajax requests and multiple theme’ is closed to new replies.