• Resolved mbanane

    (@mbanane)


    Hi Joachim,

    I was really suprised to find this amazing plugin matching all my needs for the project i’m working on! This is some really great work!
    All was working fine on my developpement machine, but now i’m experiencing some strange behaviour in production.
    As i try to make a conditionnal access to my posts, and i click in the post field, i see the usual “Searching” message then nothing never appear….
    Problem only occurs with post, neither on pages nor on categories
    I had a look in chrome developpement tools and in network tab, i saw the admin-ajax.php request. This request throws this content :

    
    ["\u00c9ch\u00e9ancier Fournisseurs ","Gamme P\u00e2ques Bolard ","Point sur les \u00e9l\u00e9ments \u00e0 me remettre "]

    I have compared it with what i get in my dev machine, and obviously, i get a well-formed JSON object

    
    [{"id":139,"text":"\u00c9ch\u00e9ancier Fournisseurs "},{"id":78,"text":"Gamme P\u00e2ques Bolard "},{"id":112,"text":"Point sur les \u00e9l\u00e9ments \u00e0 me remettre "}]

    Don’t think it come from your code as it works well on dev machine. But dev and prod environment are not really the same anymore…
    Is this problem sounds familiar to you? I thought it was maybe a server-side problem, maybe some PHP configuration…

    Any tips will be apprieciated 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mbanane

    (@mbanane)

    Hi,
    I can finally confirm that my issue is related with my server.
    Unfortunatly my host provider is still in PHP 5.3…
    So i will have to change my provider.

    Hope this helps anyone.

    Plugin Author Joachim Jensen

    (@intoxstudio)

    Thank you for reporting this and for your kind words 🙂

    The plugin should support PHP all the way down to version 5.2 (though I do highly recommend updating to version 7).

    Does your error log say anything about the request? Does the problem appear with content that does not contain special/encoded characters?

    Thread Starter mbanane

    (@mbanane)

    Hi Joachim,

    Thank you for your answer.

    I used a virtual machine to reproduce this problem.
    Wordpress runs under Windows 7, IIS, PHP 5.3.9

    Here is the output with no special code in post titles:
    ["Echeancier Fournisseurs (Brouillon)","Gamme Paques Bolard (Brouillon)","Point sur les elements a me remettre (Brouillon)"]

    I also found there’s a problem with static pages, here is the output:
    ["Front Page","Search Results","404 Page"]

    No javascript error in the console, i just see the “Searching” message without loading animation appears when the field get the focus.
    When PHP is reverted to 7, all works fine of course.
    I don’t intend running this project without PHP7, we will change our host provider within one or two weeks.

    Thougth was maybe related to some PHP plugins, but i’m running the same plugins with PHP 5.3.9 and 7.

    Plugin Author Joachim Jensen

    (@intoxstudio)

    Thank you for all the details.

    The problem is that for some reason the data format is changed/flattened so it becomes invalid. I just had a look at the code, and I think I know what might be going on, but I am not sure why earlier versions of PHP would behave that way.

    Would it be possible for you to open the following file:
    \wp-content\plugins\content-aware-sidebars\lib\wp-content-aware-engine\module\base.php

    Replace line 263 from:
    if(!isset($title['id'])) {
    to:
    if(!is_array($title)) {

    Thread Starter mbanane

    (@mbanane)

    Hi Joachim,

    It works!
    Article and static pages are now showing correctly.

    Tryied on both virtual machine and server.
    Thanks for this solution 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Eror while listing post’ is closed to new replies.