You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.
The drivers included in Wordhat should include update() methods in their ContentElement classes so that a context can call $this->getDriver()->content->update($args) to update an existing post.
Current behaviour
None of the drivers implement the ContentElement::update() method, so this is not possible.
Context
As a workaround, I tried calling the create() method (via the createContent() method available on the context) and including an ID argument, but this doesn't work with the Wpcli driver. The error is:
Error: Content, title, and excerpt are empty.
WP-CLI doesn't support the --ID argument for wp post create and returns this error for a standalone command such as:
wp post create --ID=123 --post_status=publish
Your environment
WordHat version used: 3.1.2
Environment name and version: PHP 7.2, Nginx 1.10.3
Server operating system type and version: Ubuntu 16.04
Type of Behat browser used: Selenium
The text was updated successfully, but these errors were encountered:
Thanks for creating this report, @johnbillion. On the face of it, it's a pretty big oversight. I'll have to have a think and trawl through git history to see if I had a reason for not including these (I have a suspicion that an earlier version may have removed them), but generally I think this is something that should be re-added soon.
Expected behaviour
The drivers included in Wordhat should include
update()
methods in theirContentElement
classes so that a context can call$this->getDriver()->content->update($args)
to update an existing post.Current behaviour
None of the drivers implement the
ContentElement::update()
method, so this is not possible.Context
As a workaround, I tried calling the
create()
method (via thecreateContent()
method available on the context) and including anID
argument, but this doesn't work with the Wpcli driver. The error is:WP-CLI doesn't support the
--ID
argument forwp post create
and returns this error for a standalone command such as:Your environment
The text was updated successfully, but these errors were encountered: