WordPress Help

Hi all,

please someone can help me solve these 2 needs I have on WordPress?

  1. I need to assign multiple tags to a newly created post. Can someone please tell me the format and/or the way I can do that? Until now, in my many tests, it seems I can just add one tag.

  2. In the same new post I need to upload an image as a featured media item. So I pick the image.png file from the source with the HTTP App, and I then use the “Create a new media” in the WordPress app, but it always gives me back a lot of errors.

This is the last error I got:

Error

Scenario was deactivated by Make

Scenario has encountered an error while being processed. Fix the error or clear the queue. The reason is: WordPress › Errore html { background: #f1f1f1; } body { background: #fff; color: #444; font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Roboto, Oxygen-Sans, Ubuntu, Cantarell, “Helvetica Neue”, sans-serif; margin: 2em auto; padding: 1em 2em; max-width: 700px; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13); } h1 { border-bottom: 1px solid #dadada; clear: both; color: #666; font-size: 24px; margin: 30px 0 0 0; padding: 0; padding-bottom: 7px; } #error-page { margin-top: 50px; } #error-page p, #error-page .wp-die-message { font-size: 14px; line-height: 1.5; margin: 25px 0 20px; } #error-page code { font-family: Consolas, Monaco, monospace; } ul li { margin-bottom: 10px; font-size: 14px ; } a { color: #0073aa; } a:hover, a:active { color: #006799; } a:focus { color: #124964; -webkit-box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); outline: none; } .button { background: #f7f7f7; border: 1px solid #ccc; color: #555; display: inline-block; text-decoration: none; font-size: 13px; line-height: 2; height: 28px; margin: 0; padding: 0 10px 1px; cursor: pointer; -webkit-border-radius: 3px; -webkit-appearance: none; border-radius: 3px; white-space: nowrap; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-box-shadow: 0 1px 0 #ccc; box-shadow: 0 1px 0 #ccc; vertical-align: top; } .button.button-large { height: 30px; line-height: 2.15384615; padding: 0 12px 2px; } .button:hover, .button:focus { background: #fafafa; border-color: #999; color: #23282d; } .button:focus { border-color: #5b9dd9; -webkit-box-shadow: 0 0 3px rgba(0, 115, 170, 0.8); box-shadow: 0 0 3px rgba(0, 115, 170, 0.8); outline: none; } .button:active { background: #eee; border-color: #999; -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); }

Si è verificato un errore critico sul tuo sito web.

Scopri di più riguardo al debug in WordPress.

.

Thx

@FPI :raised_hands:

Hi there! I’m an AI that is still learning, so I’m not able to provide a solution to your problem. However, I can help you by suggesting that you provide more information about your issue so that our community members can better assist you. Could you please provide more details about the errors you are receiving and the steps you have taken to try and resolve the issue? Thank you!

Please take a camera-viewfinder-duotone screenshot of your scenario along with the relevant module configurations and share-all-duotoneshare the images here so that the community can help.

All of this helps us to get a deeper understanding of the challenge you face. :make:

Hey @FPI did you manage to resolve these problems? If not, if you can post some screenshots I’m sure someone can help!

1 Like

I just ran into the same problem
I’m trying to create a new post and associate it with several categories (of course I enter the id of the category) and it doesn’t let me
It only lets me enter one category

In Make.com (Integromat), when creating a new post in WordPress, you can assign multiple tags by providing the tags as an array in the “Tags” field. Here’s the format:

[
  "Tag 1",
  "Tag 2",
  "Tag 3"
]

In your scenario, when creating a new post, map the “Tags” field to this array format. This way, you can assign multiple tags to the newly created post.
To upload an image as a featured media item, you are on the right track with the “Create a new media” module. Here are the steps you need to follow:

  • Use the HTTP App to fetch the image file.
  • Add a “Create a new media” module after fetching the image.
  • In the “Media” field, select the “Binary data” option and map the content of the fetched image to it.
  • Map other required fields like “Title,” “Caption,” “Alt Text,” etc., as needed.

If you’re encountering errors, here are some troubleshooting tips:

  • Make sure the image is fetched correctly using the HTTP App.
  • Check if the image content is properly mapped to the “Binary data” field in the “Create a new media” module.
  • Verify that you’re providing the required fields correctly (title, caption, alt text) and that they are in the right format.

If you’re still facing errors, you might want to review the error messages you’re receiving. They can often provide specific insights into what might be going wrong. Additionally, make sure that your WordPress setup allows the creation of media items via API.

Best Regards
Pro_Tanvee

3 Likes

It does not give me an answer, how do I associate a post with several categories
@DavidGurr_Make

@a7187997 The confusion is that your problem isn’t exactly the same as the OP - they were enquiring about a problem with multiple tags, whereas you’re asking about multiple categories.

If you’re manually selecting categories, you should just be able to click the square next to the name of multiple categories.

Alternatively, if you’re mapping values from earlier modules or directly entering category ID values, @Pro_Tanvee 's approach of creating an array also holds true here - when mapping multiple values into any Make field, they need to be presented as an array.

Could you attach a screen shot of your scenario and also of the open panel for the Create a Post module where you’re trying to attach the categories?

I managed, I made an API call

Hey!
I did what was told about the multiple tags, but get the same error,
see screens attached. What am I doing wrong?
Screenshot 2023-09-01 124027

Hi @Timo_Verkade, welcome to the Make community!

@Pro_Tanvee’s advice might be incorrect, since by adding the quotes it converted the type from integer into a string, which resulted in the error you are getting. Try removing the double quotes so it will look like this:

Screenshot_2023-09-04_080927

2 Likes

Hey, Thanks!
Tried this change but still gives off the same message. Seems like whatever I do (I have tried virtually every mix and match of removing the brackets, commas, "/', it does not work…

Hi @Timo345, without being able to look at your scenario, I might not be able to help further.

Could you verify that the ID is actually a number type? You can try to export the output bundle of module 89 to be sure that there are no double quotes around it.

Screenshot_2023-09-04_140906

If you see double quotes around the number, it is actually a string, you can then try to convert {{89.id}} into a number by using the parseNumber function like this:

parseNumber({{89.id}};.)

Screenshot_2023-09-04_140934

1 Like

Hey!

Tried it. The output gives a number I can see.
Weird thing is, if I just use 1 tag (like in the screen, the black tag ID), it adds them.
With the change by using parseNumber, it also gives the same error

Whoa! Could it be that the field accepts something else like a comma-or-semicolon-delimited value instead of an actual array? Give that a try and let me know if that works! (I can’t test it because I don’t have wordpress)

1 Like

yeah I have tried, like everything.
It’s very weird. Ive sent Make a support ticket aswell, maybe they can help by looking at the scenario. Weird that 1 works, but more tags does not (although it is calles “tags”…

1 Like

Reviewing this further … I believe that the Tags parameter is expecting an array object - not JSON.

The [ ] notation is correct JSON - but if I’m right, that won’t work here.

Instead you need to use an array formula to build the array.

You’d use the array add() function, with the first parameter as emptyarray, like this (replacing id1 and id2 with the literal text or mapped field values as appropriate):

3 Likes