nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
166 stars 71 forks source link

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

Closed Chrisedmo closed 1 year ago

Chrisedmo commented 1 year ago

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

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}

khalwat commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

khalwat commented 1 year ago

Ping

khalwat commented 1 year ago

Will re-open if additional information is provided.