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

400 Bad request error on 'seomatic/preview/social-media' #1343

Closed
Chrisedmo opened this issue Jul 12, 2023 · 6 comments
Closed

400 Bad request error on 'seomatic/preview/social-media' #1343

Chrisedmo opened this issue Jul 12, 2023 · 6 comments
Labels

Comments

@Chrisedmo
Copy link

Describe the bug

I'm getting an Error on SEO thumbnails - it's defaulting to fallback images.

And when viewing 'seomatic/preview/social-media' I get the following error: 400 Bad request error : Missing required parameters: elementId

any ideas what could be causing this?

Versions

  • Plugin version: 3.4.57
  • Craft version: 3.8.15

StackTRace:

yii\web\BadRequestHttpException: Missing required parameters: elementId in /Users/Sites/hostcomm3/vendor/yiisoft/yii2/web/Controller.php:201
Stack trace:
#0 /Users/Sites/hostcomm3/vendor/yiisoft/yii2/base/InlineAction.php(51): yii\web\Controller->bindActionParams(Object(yii\base\InlineAction), Array)
#1 /Users/Sites/hostcomm3/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#2 /Users/Sites/hostcomm3/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('social-media', Array)
#3 /Users/Sites/hostcomm3/vendor/craftcms/cms/src/web/Application.php(295): yii\base\Module->runAction('seomatic/previe...', Array)
#4 /Users/Sites/hostcomm3/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('seomatic/previe...', Array)
#5 /Users/Sites/hostcomm3/vendor/craftcms/cms/src/web/Application.php(280): yii\web\Application->handleRequest(Object(craft\web\Request))
#6 /Users/Sites/hostcomm3/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#7 /Users/Sites/hostcomm3/web/index.php(26): yii\base\Application->run()
#8 /Users/~~/.composer/vendor/laravel/valet/server.php(110): require('/Users/...')
#9 {main}

@Chrisedmo Chrisedmo added the bug label Jul 12, 2023
@khalwat
Copy link
Collaborator

khalwat commented Jul 13, 2023

So seomatic/preview/social-media isn't something you can visit directly in your browser, so that makes sense you see that error when trying to do that.

As for the issue you mention about missing social media images, it will fall back on the global settings if your Content SEO and / or any SEO Settings field settings resolve to nothing.

Why they would resolve to nothing, I'm not sure without more information. You're positive the transforms are working as expected?

Show me the Content SEO settings relevant to what you're seeing?

@Chrisedmo
Copy link
Author

Thanks for the replay - how can I tell if the transforms are not working ... I've tried selecting different images on the blog post and overriding etc but it always just shows the default image defined in Global SEO Image.

Im trying to do more digging and in the log files I can see this:

ERROR - Tag attribute: content -> Content is not a valid URL.

In regards to the og:image.

And please see screen shots for a page that ive been updating that is not changing.

Screenshot 2023-07-16 at 10 47 43

And this is what it is showing (falling back to the Global SEO image)
Screenshot 2023-07-16 at 10 47 48

@khalwat
Copy link
Collaborator

khalwat commented Jul 18, 2023

Please show me your Content SEO settings for this section. It appears you've just showed me the global settings, and the SEO Settings field.

@khalwat
Copy link
Collaborator

khalwat commented Jul 18, 2023

Also please show me your Twitter and Facebook OpenGraph settings as well.

@khalwat
Copy link
Collaborator

khalwat commented Jul 24, 2023

Ping

@khalwat
Copy link
Collaborator

khalwat commented Aug 8, 2023

Will re-open if additional information is provided.

@khalwat khalwat closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants