SilverStripe 6 Compatibility & Code Audit#79
Open
tomstgeorge wants to merge 4 commits into
Open
Conversation
tomstgeorge
marked this pull request as draft
April 10, 2026 21:42
This commit consolidates all changes required for SilverStripe 6 compatibility, including:
- Template Fix: Replaced $SchemaState.JSON with $SchemaAttributesHtml to correctly render data-schema and data-state for React components.
- Namespace Standardization: Unified all namespaces to Syntro\Seo (lowercase 'eo') across PHP, YAML, and documentation.
- PHP 8.2 Compatibility: Fixed dynamic property deprecations and updated getSchemaStateDefaults.
- Analysis Improvements:
- Replaced 'innerText' with 'textContent' in analysis scripts for more reliable DOM parsing.
- Added normalization (lowercase + trim) to the URL analysis check.
- Removed redundant 'brute-force' regex fallbacks once the root cause (template rendering) was fixed.
- Link Resolution: Ensured absolute URLs are used for fetch requests in SEOExtension.
tomstgeorge
marked this pull request as ready for review
April 10, 2026 22:20
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SilverStripe 6 Compatibility & Code Audit
This Pull Request consolidates all necessary changes to ensure the module is fully compatible with SilverStripe 6, while also performing a thorough cleanup of legacy workarounds and standardizing the codebase.
Key Changes
🔧 SilverStripe 6 Compatibility
$SchemaState.JSONvariable (which returns empty in SS6) with$SchemaAttributesHtmlinSEOAnalysisField.ss. This correctly serializes thedata-schemaanddata-staterequired by the React components.Syntro\SEOtoSyntro\Seo(unified lowercase "eo") across all PHP files, YAML configurations, translation files, and documentation to meet SS6 requirements.🧪 SEO Analysis Improvements
analyseURLcheck, ensuring more reliable focus keyword detection in URL segments.innerTextwith standardtextContentacross all analysis scripts (analyseH1Title.js,analyseContentWordCount.js,analyseContentFocus.js) for consistent results in all DOM environments.📦 Development & Assets
reactandreact-dom, preventing multiple versions from being loaded in the CMS.client/distreflecting all the above changes.$analysisLinkalways resolves to an absolute URL in the CMS to preventfetchfailures.Verification