passionweb-manuel-schnabel / ai-seo-helper

Generates SEO metadata based on content using AI. Currently several metadata for pages and articles of EXT:news can be generated using an additional button next to the corresponding input fields.
9 stars 5 forks source link

500 Error while Generating the AI content #8

Closed nilesh-nitsan closed 1 year ago

nilesh-nitsan commented 1 year ago

Hi, I have faced this issue while generating content -

image

TYPO3 v11.5.27 Extension v0.5.2 is the latest one.

Let me know if I missed something.

Your help is really appreciatable,

Thanks!

Originally posted by @nilesh-nitsan in https://github.com/passionweb-manuel-schnabel/ai-seo-helper/issues/7#issuecomment-1585481569

passionweb-manuel-schnabel commented 1 year ago

Hey Nilesh,

thanks for reporting the issue. I will take a closer look at the problem later and give you a response as soon as possible.

Greetins Manu

passionweb-manuel-schnabel commented 1 year ago

Hey @nilesh-nitsan,

I have now added an exception that catches the error. Since the Preview Uri is only used in certain cases, this could help you.

It is published on the master branch.

Nonetheless, I'd like to get to the bottom of this in more detail. I looked at the buildUri() function inside the PreviewBuilder (typo3/sysext/backend/Classes/Routing/PreviewUriBuilder.php). Unfortunately only the "UnableToLinkToPageException" is thrown there and no more detailed information is returned. Could you possibly send me the parameters you set/existing there (line 165 to 171)?

PreviewUriBuilder

Gladly via Slack if you don't want to share the parameters publicly.

I would be happy if we could analyze this in more detail because I have not been able to reproduce the error so far.

Greetings Manu

passionweb-manuel-schnabel commented 1 year ago

Unfortunately, I couldn't adopt the solution of your pull request 1to1, because I don't have a current ContentObject of the request to create the PreviewUri. Since I call the requests via AJAX and in the backend context, I think it would be too complicated. But I have modified the generation of the PreviewUri based on your help!

But I the current state is a good way to handle this scenario. Thanks for your hint and your suggestions!