webarkio / wp_qoob

Qoob WordPress Plugin - Realtime Frontend Page Builder of New Generation
http://webark.com/qoob/
GNU General Public License v3.0
16 stars 7 forks source link

Path to file config.json - 400 Bad Request. #31

Open sharomet opened 6 years ago

sharomet commented 6 years ago

Hi. I created file lib.json in block directory

{
    "name": "qoobLib",
    "groups": [{
        "id": "test",
        "label": "Main Blocks",
        "position": 0
    }],
    "blocks": [{
        "name": "mainblock",
        "url": "%lib_url%/blocks/mainblock/"
    }]
}

and created config.json in my_theme/blocks/mainblock/

{
    "groups": "content",
    "template": "template.hbs",
    "settings": [{
        "name": "block_id",
        "label": "Block's id",
        "type": "text"
    }, 
    {
        "name": "header",
        "label": "Block's title",
        "type": "text"
    },
    {
        "name": "content",
        "label": "Сontent",
        "type": "textarea"
    }],
    "defaults": { 
      "block_id": "", 
      "header": "Qoob Page Builder", 
      "content": "<p>Qoob website builder offers a great number of tools and features with an intuitive interface for free.</p>" 
    }
}

But when the qoob is loaded, I get an error: loader.min.js:1 GET /wp-content/themes/my_theme/blocks/%lib_url%/blocks/mainblock/config.json 400 (Bad Request) strange path to the config.json file is displayed. What could be the problem? Thank.

kaganvmz commented 6 years ago

Hi. To get this fixed, you don't need to use the mask %lib_url% and the folder /blocks/, just the name of the folder mainblock/