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

Missing "types-menu.twig" in fresh SEOmatic v5.1.10 installation #1563

Closed
schulze-jh opened this issue Jan 21, 2025 · 9 comments
Closed

Missing "types-menu.twig" in fresh SEOmatic v5.1.10 installation #1563

schulze-jh opened this issue Jan 21, 2025 · 9 comments
Labels

Comments

@schulze-jh
Copy link

During a fresh installation of SEOmatic v5.1.10 for Craft CMS, the "types-menu.twig" file is missing, preventing access to Content SEO settings.

#Environment:#
- SEOmatic version: 5.1.10
- Craft CMS version: Solo 5.5.10
- PHP version: 8.2.24

#Steps to reproduce:#
1. Install SEOmatic v5.1.10
2. Navigate to Settings > Content SEO
3. Observe missing file error

#Expected behavior:#
All necessary template files should be included in a fresh installation.

#Current workaround:#
Manually copy "types-menu.twig" from a previous version into the appropriate directory.

@schulze-jh schulze-jh added the bug label Jan 21, 2025
@russback
Copy link

Also seeing this on Craft Team 5.5.10, updated to SEOmatic 5.1.10.

No error visible but no dropdown available for entry types in Content SEO section for a section where there are multiple types.

Probably unrelated but also seeing this 500 error in Console, stating that Craft Pro is required.

twig-autocomplete.ts:261 
        
GET DOMAIN/index.php?p=admin/actions/codeeditor/autocomplete/index&fieldType=SeomaticExpressionField&codeEditorOptions=%7B%22singleLineEditor%22%3Atrue%2C%22wrapperClass%22%3A%22monaco-editor-background-frame%22%2C%22placeholderText%22%3A%22%22%2C%22displayLanguageIcon%22%3Atrue%7D 500 (Internal Server Error)

@khalwat
Copy link
Collaborator

khalwat commented Jan 21, 2025

Can you post the actual stack trace for:

  1. The missing types-menu.twig file

  2. The 500 error log that you see in console

Both will be in your storage/logs/web-*.log file (the most recent date/timestamped one), you can search on web.ERROR to find said errors.

Nowhere in SEOmatic 5.1.10 does it reference types-menu.twig so my guess would be that you need to clear caches, because probably there is a cached compiled Twig template referencing it.

The 500 error that you see in console is a separate issue, but I'd like to track it down and fix it, so providing the stack trace of the error log would be helpful.

@russback
Copy link

I've cleared all caches but still no dropdown showing.

Log example here for you:

2025-01-22 08:38:44 [web.ERROR] [craft\errors\WrongEditionException] Craft Pro is required for this. {"trace":["#0 /home/forge/nvbstudio.co.uk/deploy/vendor/craftcms/cms/src/web/twig/variables/Rebrand.php(39): craft\\web\\Application->requireEdition()","#1 [internal function]: craft\\web\\twig\\variables\\Rebrand->__construct()","#2 /home/forge/nvbstudio.co.uk/deploy/vendor/yiisoft/yii2/di/Container.php(411): ReflectionClass->newInstanceArgs()","#3 /home/forge/nvbstudio.co.uk/deploy/vendor/yiisoft/yii2/di/Container.php(170): yii\\di\\Container->build()","#4 /home/forge/nvbstudio.co.uk/deploy/vendor/yiisoft/yii2/BaseYii.php(345): yii\\di\\Container->get()","#5 /home/forge/nvbstudio.co.uk/deploy/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\\BaseYii::createObject()","#6 /home/forge/nvbstudio.co.uk/deploy/vendor/nystudio107/craft-code-editor/src/base/ObjectParserAutocomplete.php(179): yii\\di\\ServiceLocator->get()","#7 /home/forge/nvbstudio.co.uk/deploy/vendor/nystudio107/craft-code-editor/src/base/ObjectParserAutocomplete.php(124): nystudio107\\codeeditor\\base\\ObjectParserAutocomplete->getComponentCompletion()","#8 /home/forge/nvbstudio.co.uk/deploy/vendor/nystudio107/craft-code-editor/src/autocompletes/CraftApiAutocomplete.php(103): nystudio107\\codeeditor\\base\\ObjectParserAutocomplete->parseObject()","#9 /home/forge/nvbstudio.co.uk/deploy/vendor/nystudio107/craft-code-editor/src/services/AutocompleteService.php(145): nystudio107\\codeeditor\\autocompletes\\CraftApiAutocomplete->generateCompleteItems()","#10 [internal function]: nystudio107\\codeeditor\\services\\AutocompleteService::nystudio107\\codeeditor\\services\\{closure}()","#11 /home/forge/nvbstudio.co.uk/deploy/vendor/yiisoft/yii2/caching/Cache.php(608): call_user_func()","#12 /home/forge/nvbstudio.co.uk/deploy/vendor/nystudio107/craft-code-editor/src/services/AutocompleteService.php(144): yii\\caching\\Cache->getOrSet()","#13 /home/forge/nvbstudio.co.uk/deploy/vendor/nystudio107/craft-code-editor/src/controllers/AutocompleteController.php(51): nystudio107\\codeeditor\\services\\AutocompleteService->generateAutocompletes()","#14 [internal function]: nystudio107\\codeeditor\\controllers\\AutocompleteController->actionIndex()","#15 /home/forge/nvbstudio.co.uk/deploy/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()","#16 /home/forge/nvbstudio.co.uk/deploy/vendor/yiisoft/yii2/base/Controller.php(178): yii\\base\\InlineAction->runWithParams()","#17 /home/forge/nvbstudio.co.uk/deploy/vendor/yiisoft/yii2/base/Module.php(552): yii\\base\\Controller->runAction()","#18 /home/forge/nvbstudio.co.uk/deploy/vendor/craftcms/cms/src/web/Application.php(350): yii\\base\\Module->runAction()","#19 /home/forge/nvbstudio.co.uk/deploy/vendor/craftcms/cms/src/web/Application.php(649): craft\\web\\Application->runAction()","#20 /home/forge/nvbstudio.co.uk/deploy/vendor/craftcms/cms/src/web/Application.php(312): craft\\web\\Application->_processActionRequest()","#21 /home/forge/nvbstudio.co.uk/deploy/vendor/yiisoft/yii2/base/Application.php(384): craft\\web\\Application->handleRequest()","#22 /home/forge/nvbstudio.co.uk/deploy/public/index.php(12): yii\\base\\Application->run()","#23 {main}"],"memory":4808976,"exception":"[object] (craft\\errors\\WrongEditionException(code: 0): Craft Pro is required for this. at /home/forge/nvbstudio.co.uk/deploy/vendor/craftcms/cms/src/base/ApplicationTrait.php:704)"} 

@khalwat
Copy link
Collaborator

khalwat commented Jan 23, 2025

What dropdown are you saying isn't showing that should be? Are you saying you no longer receive an error about types-menu.twig being missing?

As for that error log, have you done a composer update recently? Because it seems like there's an old version of craft-code-editor installed, the latest version should catch that error.

@schulze-jh
Copy link
Author

@khalwat ,

Thank you for your assistance. After running "composer update", the SEOmatic settings page now loads successfully without the "types-menu.twig" file. This appears to have resolved the original issue. To summarize the current status:

  1. The initial error regarding the missing "types-menu.twig" file is no longer occurring.
  2. The SEOmatic settings page is now functioning correctly.
  3. I'm using the latest version of SEOmatic (5.1.10) with Craft Solo 5.5.10.

I haven't noticed any other issues, such as missing dropdown menus for Entry Types in the Content SEO section, which some other users have reported.

@russback
Copy link

What dropdown are you saying isn't showing that should be? Are you saying you no longer receive an error about types-menu.twig being missing?

I've not seen an error related to a twig file, the dropdown where you select Entry Types is not showing. There are multiple Entry Types for this section and I'm unable to set general settings for each type:

Image Image

Compared to another site on SEOmatic 5.1.7/Craft 5.5.4:

Image

As for that error log, have you done a composer update recently? Because it seems like there's an old version of craft-code-editor installed, the latest version should catch that error.

The error in the log was resolved when I updated from Craft Team to Pro but a composer update has also been run now and no errors occurring, so thanks for that info.

khalwat added a commit that referenced this issue Jan 23, 2025
…s would only appear if you had mulitple sites ([#1563](#1563))
@khalwat
Copy link
Collaborator

khalwat commented Jan 23, 2025

@russback ah my mistake, it was errantly not adding the Entry Types menu unless the site was multi-site.

Fixed in the above commit

Craft CMS 5:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop-v5 as 5.1.11”,

Then do a composer clear-cache && composer update

@khalwat khalwat closed this as completed Jan 23, 2025
@khalwat
Copy link
Collaborator

khalwat commented Jan 23, 2025

Released as version 5.1.11 for Craft CMS 5.

@russback
Copy link

Amazing - thanks @khalwat

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

3 participants