• Resolved auedbaki

    (@auedbaki)


    I’m trying to update the post status with WordPress Api but with thus English Content got empty. I don’t know why can you please help me with this issue?

    axios.post(https://domain.com/wp-json/wp/v2/posts/${req.body.id}, {status: req.body.status, date: date, date_gmt: date}, {headers: {"Authorization" :Bearer ${process.env[‘wptoken’]}`}} ).then(result=> {
    if(result.status == 200) {
    res.json({success: true, message: ‘Status updated’})
    } else {
    res.json({success: false, message: ‘Some Error Occured’})
    }
    })`

    This is the code On my nodeJs server which is used to update the status of the post.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Alex Gor

    (@alexgff)

    Please read Application Passwords:Integration Guide
    It may helps.

    Thread Starter auedbaki

    (@auedbaki)

    @alexgff Your response doesn’t relate to the problem. I have no problem with passwords because i’m using jwt-auth plugin and authenticating with jwt.

    Problem is On updating the post with Rest Api
    if i doesn’t provide content in request body then the content of the post become empty. Which should not happen.

    Plugin Support Alex Gor

    (@alexgff)

    I am using cURL to test REST API
    curl --user "admin:{app_password}" -X POST http://my-site.com/wp-json/wp/v2/posts/{id}/ -d status=publish
    It doesn’t reset post content.

    Thread Starter auedbaki

    (@auedbaki)

    @alexgff Are you using WPGlobus or not? This issue occur with WP Globus plugin.

    • This reply was modified 4 years, 7 months ago by auedbaki.
    Plugin Support Alex Gor

    (@alexgff)

    Sure. I am using WPGlobus

    Thread Starter auedbaki

    (@auedbaki)

    Even i’m using the latest version. if i mention ?language=<lang_code> in url query then it clear the content of that language.
    If i doesn’t mention language query then it clear the english content. I well tested this.

    also i looked into the sql with each step.

    BTW let it go, i found a work around by adding addiotional useless language then adding that lang code in url query params. Which clear the content of useless language.

    Thanks for your time.

    Plugin Support Alex Gor

    (@alexgff)

    @auedbaki Please paste here full request code with language code for clarifying.

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

The topic ‘English Content got missing’ is closed to new replies.