Invalid Syntax - Publish

Hello,
I try to click Publish from Draft, but it does not work due to invalid syntax.
How can I solve this issue? Please help me.
Please take a look at the screenshot copies below.

Screen Shot 2024-01-21 at 10.56.40 PM

Screen Shot 2024-01-21 at 10.56.59 PM

Best,

Hi @koeiyabe!

As in the other topic, can you provide the console errors so we can take a better look?

My bet here is that for some reason then items request is being made without collection ID, but we have to understand why… Have you tries updating your permalinks?

Yes, I try to update Permalinks. However, I lost everything when I selected “PLAIN,” not Post Name or Custom Structure. I need to remain Post Name selected. I cannot select Custom Structure because Post Name is automatically fixed to select.

All the items are imported from CSV. When I tried to add a new item that is not from the CSV, it can work because I can choose either Publish or Draft. All the items imported from CSV must be in the same collection.

My ideal path
https://example.com/*** (Collection’s name)/*** (One item’s name)

For the other topic, it was solved.

Yeah if you select Post name and everything is working fine that should be how it is displayed. But in any case, this error where you cannot publish items, does it still happens? If yes, can you check the error logs?

I just checked the error logs, but I’m not sure how to do.

I just followed the link to the instruction below. Is it right?

Actually, I was done, but the debug.log file never shows up.

That error is still occurring.

No in this case we would like to take a look at your browser console errors, as described here:

You can access them at the moment that you try to publish the items. Take a look at the network tab where there should be a red request with the error details and sens us as much info from it as you can. Then we can see if there is some explanation for this.

Yeah, please take a look at the screenshot copies from the console tab, network tab, and sources tab.

The error message from the item’s page address.
{“code”:“rest_forbidden”,“message”:“Sorry, you are not allowed to do that.”,“data”:{“status”:401}}

I look forward to your help.

Uhmm, we’re almost there… 400 errors imply that the data sent in the request was in a wrong format. Can you send us the details of the payload sent in one of those errored lines? In my case it looks like this:

If possible also sent the Preview tab screenshot.

Please find the attached screenshot copies of Payload and Preview.


I am still waiting for your solution, and I can start uploading a lot of my CSV files to my website asap.

@koeiyabe can you check what is going on with that Variety metadata? While the error should have been presented on the UI, the API at least is telling us that there is a required “Variety” metadata that is not filled.

Yes, it does work. Thanks. It can work when I fill out all the information in each metadata bar.

Also, I fixed three options in Insert Options of “Configure the metadatum” in the Metadata page.

Solved!

Glad it works @koeiyabe. Before I close this topic, can you please describe me how was this metadata set? I mean it’s type and options that you enabled in the metadata form. I would like to try to emulate the same error, because these error message that appears in the request should also appear in the item edition form footer.

I’m not sure what you want to ask me, but I try to attach the screenshot copy of my metadata samples. I hope this helps you. If this is not right about what you want to ask me, please let me know.

Yeah I just wanted to emulate the same setting that you have… because when I create a metadata like that and try to publish an item without having values for a required metadata it displays the error in the UI, like this:

You should not need to look into the inspector as we did to understand the cause of the error. So I was trying to catch a situation where it does not appear.

Yeah, I want to thank you very much for your help. Simply, I need NOT to click “Required” for values.

I will contact you again when I find any new technical problems.

Best wishes in your business.

1 Like

Este tópico foi fechado automaticamente 5 dias depois da última resposta. Novas respostas não são mais permitidas.