Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Wordpress Tool #349

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

tybalex
Copy link
Contributor

@tybalex tybalex commented Jan 17, 2025

WordPress Tool(obot-platform/obot#1035) for cloud-hosting-platforms' wordpress sites and user self-hosted sites, typically hosted on platforms like bluehost, wpengine, ...etc.
NOTE: Not working for Wordpress.com
Functions:

  • List Users
  • Get User
  • Create Post
  • List Posts
  • Retrieve Post
  • Update Post
  • Delete Post
  • Get Site Settings

This tool uses Basic Auth, its UI looks like this:
Screenshot 2025-01-22 at 9 27 03 PM
The user need to config 3 fields:
username, password(or application password), and the wordpress_site.

I updated the basic-auth tool, pls let me know if it looks good to you @njhale @thedadams , the url_field is optional so it won't affect the bluesky tool.

@tybalex tybalex self-assigned this Jan 17, 2025
@tybalex tybalex marked this pull request as draft January 17, 2025 12:37
@tybalex tybalex marked this pull request as ready for review January 22, 2025 13:58
@cjellick
Copy link
Contributor

cjellick commented Jan 23, 2025

not building for me

[server] time="2025-01-23T16:19:10-07:00" level=error msg="Failed to load tool github.com/obot-platform/tools/wordpress: run encountered an error: run encountered an error: status code 500 with error output: failed to load program: failed linking List Users at ../tools/wordpress/tool.gpt: failed resolving ./credential from ../tools/wordpress/tool.gpt: failed resolving ../../basic-auth as wordpress with wordpress_site as url_field and WORDPRESS_SITE as url_env and wordpress_username as username_field and WORDPRESS_USERNAME as username_env and wordpress_password as password_field and WORDPRESS_PASSWORD as password_env and "Enter your Wordpress site url, username and password or application password. It's recommended to use application password, which can be generated from an Edit User page (wp-admin -> Users -> Edit User), the Application Passwords section is located at the bottom of the page." as message from ../tools/wordpress/credential/tool.gpt: can not load tools path=../tools/wordpress/credential name=an Edit User page (wp-admin -> Users -> Edit User), the Application Passwords section is located at the bottom of the page."" logger=/pkg/controller/handlers/toolreference

@tybalex
Copy link
Contributor Author

tybalex commented Jan 24, 2025

not building for me

[server] time="2025-01-23T16:19:10-07:00" level=error msg="Failed to load tool github.com/obot-platform/tools/wordpress: run encountered an error: run encountered an error: status code 500 with error output: failed to load program: failed linking List Users at ../tools/wordpress/tool.gpt: failed resolving ./credential from ../tools/wordpress/tool.gpt: failed resolving ../../basic-auth as wordpress with wordpress_site as url_field and WORDPRESS_SITE as url_env and wordpress_username as username_field and WORDPRESS_USERNAME as username_env and wordpress_password as password_field and WORDPRESS_PASSWORD as password_env and "Enter your Wordpress site url, username and password or application password. It's recommended to use application password, which can be generated from an Edit User page (wp-admin -> Users -> Edit User), the Application Passwords section is located at the bottom of the page." as message from ../tools/wordpress/credential/tool.gpt: can not load tools path=../tools/wordpress/credential name=an Edit User page (wp-admin -> Users -> Edit User), the Application Passwords section is located at the bottom of the page."" logger=/pkg/controller/handlers/toolreference

@cjellick it seems that the server doesn't like it when the credential message is too long. I fixed it, it should work now.
I wanted to show instructions to user in the message though.

@cjellick
Copy link
Contributor

@thedadams is looking into it. I thought it was length to but it seems to be a keyword.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants