Closed Kylewalow closed 2 days ago
Hey, thanks for the report!
Is this an issue only on v5? Is this a new website or something you've updated to v5?
Thank you for your fast response. In all our v4 projects, it works. It's a newly created v5 Statamic project, which already had some content, in which we implemented Seotamic yesterday with:
composer require cnj/seotamic
We're using Statamic headless with a Nuxt3 frontend. I've tested and encountered the behavior in the Statamic GraphQL editor and when fetching from the frontend.
I just did some tests on my test install, with some content, and GraphQL works fine for me.
Are you able to share the non working project with me? A zip is also fine if you can't add me to the repository. You can send the zip to martin@cnj.si
Sorry for the long response time.
I'm afraid I'm not allowed to share the non-working project, but I tested it with a newly created Statamic project and encountered the same problem.
1. Create a New Statamic Project:
Run statamic new statamic_test
to install Statamic version 5.21.0.
2. Configure Environment Settings: In the .env file, enable PRO features and GraphQL with:
STATAMIC_PRO_ENABLED=true
STATAMIC_GRAPHQL_ENABLED=true
3. Configure GraphQL Settings Configure the resources in graphql.php as follows:
'resources' => [
'collections' => true,
'navs' => true,
'taxonomies' => true,
'assets' => true,
'globals' => true,
'forms' => true,
'sites' => true,
'users' => true,
],
4. Install Seotamic:
Run composer require cnj/seotamic.
Then in the GraphQL Editor:
A subselection is not allowed:
Statamic: v5.21.0 cnj/seotamic: v5.0.0
Are there any updates on this? Our release date is approaching, and I’m really hoping to use SEOtamic as part of it.
Not yet, we are bit thinned out due to vacations, I will get to this soon, hopefully by the end of this week or early next week.
I've tried reproducing but failed :/
I did install the Cool Writings starter kit to have some content.
And what I did differently I've added the seotamic pro edition in editions.php
<?php
return [
'pro' => env('STATAMIC_PRO_ENABLED', false),
'addons' => [
'cnj/seotamic' => 'pro'
],
];
My query gets autocompleted if I put in seotamic_meta
with the additional fields automatically as I run the query or press enter.
❯ php please support:details
Environment
Application Name: Statamic
Laravel Version: 11.22.0
PHP Version: 8.3.10
Composer Version: 2.7.7
Environment: local
Debug Mode: ENABLED
URL: statamic_test.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: NOT CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file
Statamic
Addons: 1
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.24.0 PRO
Statamic Addons
cnj/seotamic: 5.0.0
'addons' => [
'cnj/seotamic' => 'pro'
],
This solved the problem. As far as I’m concerned, you can close this issue. Thank you very much for your help!
No worries, glad we sorted it out!
cnj/seotamic v5.0@beta statamic/cms v^5.0 Headless with GraphQL
We're encountering a problem while fetching data from Seotamic using GraphQL:
We received the following debugMessage:
"debugMessage": "Expected a value of type String but received: {\"title\":\"Startseite Baryon AG\",\"description\":\"Als unabh\u00e4ngiges, erfahrenes Unternehmen spezialisieren wir uns auf Verm\u00f6gensverwaltung sowie Steuer-, Unternehmens- und Rechtsberatung.\",\"canonical\":\"http:\/\/localhost:3000\/\",\"robots\":\"\",\"related\":[{\"lang\":\"en\",\"href\":\"http:\/\/localhost:3000\/en\"}]}. String cannot represent value: {\"title\":\"Startseite Baryon AG\",\"description\":\"Als unabh\u00e4ngiges, erfahrenes Unternehmen spezialisieren wir uns auf Verm\u00f6gensverwaltung sowie Steuer-, Unternehmens- und Rechtsberatung.\",\"canonical\":\"http:\/\/localhost:3000\/\",\"robots\":\"\",\"related\":[{\"lang\":\"en\",\"href\":\"http:\/\/localhost:3000\/en\"}]}"
Based on my understanding, seotamic_meta should have a subselection like this:
However, this results in the following message: "Field 'seotamic_meta' of type 'String' must not have a sub-selection."
Is this a bug, or am I missing some settings? Thank you for your help.