We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
So this code in v5.1 was working alright:
$tags = new SeoProTags(); $tags->setContext($this->entry->toAugmentedCollection()); $meta = $tags->metaData();
giving the following output:
"site": { "handle": "en", "name": "English", "lang": "en", "locale": "en-US", "short_locale": "en", "url": "/en", "permalink": "http://sandbox.test/en", "direction": "ltr", "attributes": [] }, "alternate_locales": [ { "site": { "handle": "other", "name": "Other", "lang": "ot", "locale": "ot-HER", "short_locale": "ot", "url": "/other", "permalink": "http://sandbox.test/other", "direction": "ltr", "attributes": [] }, "url": "http://sandbox.test/other" } ],
But when i updated to 5.2, this is what i get now:
"site": {}, "alternate_locales": [ { "site": {}, "url": "http://kit.test/other" } ],
If i revert back to 5.1 then it works again. No code was changed when trying this.
Notes: I have disabled statamic routing, I am using laravel's Route::fallback to handle requests, and this piece of code is part of the controller.
Route::fallback
The text was updated successfully, but these errors were encountered:
The tag class is intended to be used as a tag. Not really arbitrarily in a controller.
But you can work around this by adding the following lines.
$tags = new SeoProTags(); $tags->setContext($this->entry->toAugmentedCollection()); $meta = $tags->metaData(); +$meta['site'] = $meta['site']->toAugmentedArray(); +$meta['alternate_locales'] = collect($meta['alternate_locales'])->map(function ($alt) { + return array_merge($alt, ['site' => $alt['site']->toAugmentedArray()]); +})->all();
Sorry, something went wrong.
Yeah, this is a bit of a workaround as mentioned in #248 and #264. But thanks for sharing that solution for the time being.
No branches or pull requests
So this code in v5.1 was working alright:
giving the following output:
But when i updated to 5.2, this is what i get now:
If i revert back to 5.1 then it works again. No code was changed when trying this.
Notes: I have disabled statamic routing, I am using laravel's
Route::fallback
to handle requests, and this piece of code is part of the controller.The text was updated successfully, but these errors were encountered: