statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.11k stars 539 forks source link

ArrayIterator::__construct(): Argument #1 ($array) must be of type array, string given #9352

Open axelferdinand opened 10 months ago

axelferdinand commented 10 months ago

Bug description

See this thread on Discord: https://discord.com/channels/489818810157891584/1196439151604678756

As reported, as of Statamic version 4.42.1 and upwards, I get this error in most of my templates:

ArrayIterator::__construct(): Argument #1 ($array) must be of type array, string given

I narrowed it down to the following:

In my default template default.antlers.html I have the following markup:

<main class="page page--{{ page_max_width }} ng-cloak" id="main" tabindex="0">
  {{ partial:modules }}
</main>

This works perfectly fine. However, in my other templates, i.e. events.antlers.html, I get the error above – despite markup being almost identical:

<main class="event">
  {{ partial:modules }}
</main>

This is the content of partial:modules:

<div class="section section--first">
  <div class="modules{{ if hero }} modules--after-hero{{ /if }}" id="modules">{{ modules scope="module" }}{{ if type == "section" }}</div>
</div>
<div class="section section--{{ section_air }} section--max-width-{{ section_max_width }} section--theme-{{ section_theme }}{{ if section_id }} section--toc" id="{{ section_id | slugify }}" data-section-name="{{ section_id }}" {{ else }}" id="section-{{ index }}" {{ /if }}>
  <div class="modules" id="modules{{ index }}">{{ else }}
    <div class="module module--{{ type }}{{ if module_max_width }} module--max-width-{{ module_max_width }}{{ /if }}{{ if module_align }} module--align-{{ module_align }}{{ /if }}{{ if module_reset_padding }} module--reset-padding{{ /if }}{{ if module_grid == "custom" }}
  module--mobile-span-{{ module_mobile_span }}-columns
  module--tablet-span-{{ module_tablet_span }}-columns
  module--desktop-span-{{ module_desktop_span }}-columns
{{ /if }}" id="{{ if module_id }}{{ module_id | slugify }}{{ else }}module-{{ index }}{{ /if }}">{{ if type != "header" }}{{ partial src="modules/header" }}{{ /if }}{{ partial src="modules/{type}" }}</div>{{ /if }}{{ /modules }}
  </div>
</div>

It's fairly complex, but it does what it should – until Statamic version 4.42.1 arrived...

Removing {{ partial src="modules/{type}" }} removes the error, but I have manually gone through every single type of modules, by deleting one by one to see if the error dissapears, but it doesn't.

Really weird.

Help?

How to reproduce

Oh, see above 😅

Logs

[2024-01-18 14:15:48] development.ERROR: ArrayIterator::__construct(): Argument #1 ($array) must be of type array, string given {"exception":"[object] (TypeError(code: 0): ArrayIterator::__construct(): Argument #1 ($array) must be of type array, string given at /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Fields/Value.php:73)
[stacktrace]
#0 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Fields/Value.php(73): ArrayIterator->__construct('<p>Virke har f\\xC3...')
#1 [internal function]: Statamic\\Fields\\Value->getIterator()
#2 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(1033): iterator_to_array(Object(Statamic\\Fields\\Value))
#3 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(43): Illuminate\\Support\\Collection->getArrayableItems(Object(Statamic\\Fields\\Value))
#4 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Collections/helpers.php(18): Illuminate\\Support\\Collection->__construct(Object(Statamic\\Fields\\Value))
#5 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Fieldtypes/Bard.php(512): collect(Object(Statamic\\Fields\\Value))
#6 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Fieldtypes/Bard.php(253): Statamic\\Fieldtypes\\Bard->convertLegacyTiptap(Object(Statamic\\Fields\\Value))
#7 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Fieldtypes/Replicator.php(173): Statamic\\Fieldtypes\\Bard->performAugmentation(Object(Statamic\\Fields\\Value), false)
#8 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Fields/Value.php(48): Statamic\\Fieldtypes\\Replicator->augment(Object(Statamic\\Fields\\Value))
#9 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/PathDataManager.php(454): Statamic\\Fields\\Value->value()
#10 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/PathDataManager.php(598): Statamic\\View\\Antlers\\Language\\Runtime\\PathDataManager->checkForValueIntercept(Object(Statamic\\View\\Antlers\\Language\\Nodes\\Paths\\PathNode))
#11 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/Sandbox/Environment.php(1270): Statamic\\View\\Antlers\\Language\\Runtime\\PathDataManager->getData(Object(Statamic\\View\\Antlers\\Language\\Nodes\\Paths\\VariableReference), Array)
#12 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/Sandbox/Environment.php(1583): Statamic\\View\\Antlers\\Language\\Runtime\\Sandbox\\Environment->scopeValue(Object(Statamic\\View\\Antlers\\Language\\Nodes\\Paths\\VariableReference), Object(Statamic\\View\\Antlers\\Language\\Nodes\\VariableNode))
#13 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/Sandbox/Environment.php(947): Statamic\\View\\Antlers\\Language\\Runtime\\Sandbox\\Environment->getValue(Object(Statamic\\View\\Antlers\\Language\\Nodes\\VariableNode))
#14 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/Sandbox/Environment.php(1564): Statamic\\View\\Antlers\\Language\\Runtime\\Sandbox\\Environment->process(Array)
#15 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/Sandbox/Environment.php(947): Statamic\\View\\Antlers\\Language\\Runtime\\Sandbox\\Environment->getValue(Object(Statamic\\View\\Antlers\\Language\\Nodes\\Structures\\SemanticGroup))
#16 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/Sandbox/Environment.php(295): Statamic\\View\\Antlers\\Language\\Runtime\\Sandbox\\Environment->process(Array)
#17 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/Sandbox/Environment.php(318): Statamic\\View\\Antlers\\Language\\Runtime\\Sandbox\\Environment->processStatements(Array)
#18 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/Sandbox/Environment.php(352): Statamic\\View\\Antlers\\Language\\Runtime\\Sandbox\\Environment->evaluate(Array)
#19 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/ConditionProcessor.php(100): Statamic\\View\\Antlers\\Language\\Runtime\\Sandbox\\Environment->evaluateBool(Array)
#20 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/NodeProcessor.php(1305): Statamic\\View\\Antlers\\Language\\Runtime\\ConditionProcessor->process(Object(Statamic\\View\\Antlers\\Language\\Nodes\\Conditions\\ConditionNode), Array)
#21 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/NodeProcessor.php(750): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->reduce(Array)
#22 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/RuntimeParser.php(381): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->render(Array)
#23 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/RuntimeParser.php(773): Statamic\\View\\Antlers\\Language\\Runtime\\RuntimeParser->renderText('{{ if text }}\\n<...', Array)
#24 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Engine.php(93): Statamic\\View\\Antlers\\Language\\Runtime\\RuntimeParser->parseView('/Users/afg/Nett...', '{{ if text }}\\n<...', Array)
#25 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/View/View.php(207): Statamic\\View\\Antlers\\Engine->get('/Users/afg/Nett...', Array)
#26 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/View/View.php(190): Illuminate\\View\\View->getContents()
#27 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/View/View.php(159): Illuminate\\View\\View->renderContents()
#28 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Tags/Partial.php(29): Illuminate\\View\\View->render()
#29 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Tags/Partial.php(13): Statamic\\Tags\\Partial->render('modules/text')
#30 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Tags/Tags.php(138): Statamic\\Tags\\Partial->wildcard('index')
#31 [internal function]: Statamic\\Tags\\Tags->__call('index', Array)
#32 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/NodeProcessor.php(1597): call_user_func(Array)
#33 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/NodeProcessor.php(2324): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->reduce(Array)
#34 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/NodeProcessor.php(750): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->reduce(Array)
#35 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/RuntimeParser.php(381): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->render(Array)
#36 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/RuntimeParser.php(773): Statamic\\View\\Antlers\\Language\\Runtime\\RuntimeParser->renderText('<div class=\"sec...', Array)
#37 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Engine.php(93): Statamic\\View\\Antlers\\Language\\Runtime\\RuntimeParser->parseView('/Users/afg/Nett...', '<div class=\"sec...', Array)
#38 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/View/View.php(207): Statamic\\View\\Antlers\\Engine->get('/Users/afg/Nett...', Array)
#39 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/View/View.php(190): Illuminate\\View\\View->getContents()
#40 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/View/View.php(159): Illuminate\\View\\View->renderContents()
#41 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Tags/Partial.php(29): Illuminate\\View\\View->render()
#42 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Tags/Partial.php(13): Statamic\\Tags\\Partial->render('modules')
#43 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Tags/Tags.php(138): Statamic\\Tags\\Partial->wildcard('modules')
#44 [internal function]: Statamic\\Tags\\Tags->__call('modules', Array)
#45 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/NodeProcessor.php(1597): call_user_func(Array)
#46 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/NodeProcessor.php(750): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->reduce(Array)
#47 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/RuntimeParser.php(381): Statamic\\View\\Antlers\\Language\\Runtime\\NodeProcessor->render(Array)
#48 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Language/Runtime/RuntimeParser.php(773): Statamic\\View\\Antlers\\Language\\Runtime\\RuntimeParser->renderText('<main class=\"ev...', Array)
#49 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/Antlers/Engine.php(93): Statamic\\View\\Antlers\\Language\\Runtime\\RuntimeParser->parseView('/Users/afg/Nett...', '<main class=\"ev...', Array)
#50 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/View/View.php(207): Statamic\\View\\Antlers\\Engine->get('/Users/afg/Nett...', Array)
#51 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/View/View.php(190): Illuminate\\View\\View->getContents()
#52 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/View/View.php(159): Illuminate\\View\\View->renderContents()
#53 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/View/View.php(100): Illuminate\\View\\View->render()
#54 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Responses/DataResponse.php(146): Statamic\\View\\View->render()
#55 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Responses/DataResponse.php(42): Statamic\\Http\\Responses\\DataResponse->contents()
#56 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Entries/Entry.php(475): Statamic\\Http\\Responses\\DataResponse->toResponse(Object(Illuminate\\Http\\Request))
#57 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Routing/Router.php(900): Statamic\\Entries\\Entry->toResponse(Object(Illuminate\\Http\\Request))
#58 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Routing/Router.php(885): Illuminate\\Routing\\Router::toResponse(Object(Illuminate\\Http\\Request), Object(Statamic\\Entries\\Entry))
#59 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\\Routing\\Router->prepareResponse(Object(Illuminate\\Http\\Request), Object(Statamic\\Entries\\Entry))
#60 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#61 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/StaticCaching/Middleware/Cache.php(60): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#62 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\StaticCaching\\Middleware\\Cache->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#63 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Middleware/AuthGuard.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#64 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\AuthGuard->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#65 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Middleware/AddViewPaths.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#66 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\AddViewPaths->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#67 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Middleware/Localize.php(38): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#68 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\Localize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#69 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Middleware/HandleToken.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#70 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\HandleToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#71 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Middleware/StacheLock.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#72 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\StacheLock->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#73 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#74 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#75 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#76 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#77 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#78 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#79 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#80 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure))
#81 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#82 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#83 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#84 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#85 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#86 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#87 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#88 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#89 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#90 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#91 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#92 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#93 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Middleware/StopImpersonating.php(12): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#94 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\StopImpersonating->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#95 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Middleware/DisableFloc.php(17): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#96 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\DisableFloc->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#97 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Middleware/CheckMultisite.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#98 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CheckMultisite->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#99 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Middleware/CheckComposerJsonScripts.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#100 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CheckComposerJsonScripts->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#101 /Users/afg/Nettsteder/virke.no/vendor/statamic/cms/src/Http/Middleware/PoweredByHeader.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#102 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\PoweredByHeader->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#103 /Users/afg/Nettsteder/virke.no/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#104 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#105 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#106 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#107 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#108 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#109 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#110 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#111 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#112 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#113 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(99): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#114 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#115 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#116 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#117 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#118 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#119 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#120 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#121 /Users/afg/Nettsteder/virke.no/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#122 /Users/afg/Nettsteder/virke.no/public/index.php(51): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#123 /Users/afg/.composer/vendor/laravel/valet/server.php(250): require('/Users/afg/Nett...')
#124 {main}
"}

Environment

Environment
Application Name: Virke
Laravel Version: 10.41.0
PHP Version: 8.2.10
Composer Version: 2.5.5
Environment: development
Debug Mode: ENABLED
URL: virke.proto
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: NOT CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: sendmail
Queue: sync
Session: file

Statamic
Addons: 2
Antlers: runtime
Stache Watcher: Disabled
Static Caching: Disabled
Version: 4.44.0 PRO

Statamic Addons
aryehraber/statamic-captcha: 1.10.0
pecotamic/sitemap: 1.4.6

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

Runtime (default)

Additional details

Nah

jasonvarga commented 10 months ago

Is 4.42.1 also broken?

axelferdinand commented 10 months ago

Yes, tried that specific version now, and the same error is thrown.

jasonvarga commented 10 months ago

Ok I've updated your description then. I think this is caused by https://github.com/statamic/cms/pull/9198

jasonvarga commented 10 months ago

You have some bard field that has a value starting with <p>Virke har f... (I know that may be hard to find)

Can you provide the blueprint field yaml for that?

axelferdinand commented 10 months ago

Here you go:

title: Event
sections:
  main:
    display: Main
    fields:
      -
        handle: title
        field:
          type: text
          required: true
          display: Title
          localizable: true
          listable: hidden
          input_type: text
          antlers: false
          validate:
            - required
      -
        handle: lead
        field:
          type: text
          display: Lead
          localizable: true
      -
        handle: img_featured
        field:
          type: assets
          display: 'Featured image'
          container: main
          folder: img
          max_files: 1
          listable: hidden
          mode: grid
          restrict: false
          allow_uploads: true
      -
        import: intro
      -
        import: modules
  sidebar:
    display: Sidebar
    fields:
      -
        handle: slug
        field:
          type: slug
          localizable: true
          validate:
            - required
      -
        handle: event_style
        field:
          options:
            default: Default
            featured: Featured
            conference: Conference
          inline: false
          cast_booleans: false
          display: 'Event style'
          type: radio
          icon: radio
          listable: hidden
          instructions_position: above
          visibility: visible
          always_save: false
          default: default
      -
        handle: toc
        field:
          default: false
          display: 'Table of contents'
          type: toggle
          icon: toggle
          instructions: 'Display anchor navigation based on sections.'
          listable: hidden
          instructions_position: above
          visibility: visible
          always_save: false
          if:
            event_style: 'equals conference'
      -
        handle: toc_title
        field:
          input_type: text
          antlers: false
          display: 'Sticky nav title'
          type: text
          icon: text
          listable: hidden
          instructions_position: above
          visibility: visible
          always_save: false
          if:
            toc: 'equals true'
            event_style: 'equals conference'
      -
        handle: toc_location
        field:
          input_type: text
          antlers: false
          display: 'Sticky nav location'
          type: text
          icon: text
          listable: hidden
          instructions_position: above
          visibility: visible
          always_save: false
          if:
            toc: 'equals true'
            event_style: 'equals conference'
      -
        handle: anchor_box
        field:
          default: false
          display: 'Anchor box'
          type: toggle
          icon: toggle
          listable: hidden
          instructions_position: above
          visibility: visible
          always_save: false
          instructions: 'When true, a box with menu items will be shown before the sticky navigation.'
          if:
            toc: 'equals true'
            event_style: 'equals conference'
      -
        handle: disciplines
        field:
          type: terms
          taxonomies:
            - disciplines
          display: Disciplines
          mode: select
          instructions_position: above
          listable: hidden
          visibility: visible
          create: true
          always_save: false
      -
        handle: events
        field:
          type: terms
          taxonomies:
            - events
          display: Category
          mode: select
          listable: hidden
          create: true
          instructions_position: above
          visibility: visible
          max_items: 1
          always_save: false
      -
        handle: date
        field:
          type: date
          required: true
          mode: single
          time_enabled: false
          time_seconds_enabled: false
          full_width: false
          inline: false
          columns: 1
          rows: 1
          display: Date
          icon: date
          listable: hidden
          instructions_position: above
          visibility: visible
          validate:
            - required
      -
        handle: time_from
        field:
          seconds_enabled: false
          display: 'Time from'
          type: time
          icon: time
          width: 50
          listable: hidden
          instructions_position: above
          visibility: visible
      -
        handle: time_to
        field:
          seconds_enabled: false
          display: 'Time to'
          type: time
          icon: time
          width: 50
          listable: hidden
          instructions_position: above
          visibility: visible
      -
        handle: last_day
        field:
          mode: single
          time_enabled: false
          time_seconds_enabled: false
          full_width: false
          inline: false
          columns: 1
          rows: 1
          display: 'Last day'
          type: date
          icon: date
          instructions: 'If event spans over multiple days.'
          listable: hidden
          instructions_position: above
          visibility: visible
      -
        handle: note
        field:
          input_type: text
          antlers: false
          display: Note
          type: text
          icon: text
          listable: hidden
          instructions_position: above
          visibility: visible
      -
        handle: address
        field:
          input_type: text
          antlers: false
          display: Address
          type: text
          icon: text
          listable: hidden
          instructions_position: above
          visibility: visible
      -
        handle: alternative
        field:
          collapse: false
          always_show_set_button: false
          previews: true
          buttons:
            - h2
            - h3
            - bold
            - italic
            - unorderedlist
            - orderedlist
            - removeformat
            - quote
            - anchor
            - image
            - table
          save_html: false
          toolbar_mode: fixed
          link_noopener: false
          link_noreferrer: false
          target_blank: false
          reading_time: false
          fullscreen: true
          allow_source: true
          enable_input_rules: true
          enable_paste_rules: true
          antlers: false
          remove_empty_nodes: false
          display: Alternative
          type: bard
          icon: bard
          listable: hidden
          instructions_position: above
          visibility: visible
          always_save: false
      -
        handle: price
        field:
          display: Price
          type: integer
          icon: integer
          listable: hidden
          instructions_position: above
          visibility: visible
      -
        handle: price_member
        field:
          display: 'Price member'
          type: integer
          icon: integer
          listable: hidden
          instructions_position: above
          visibility: visible
      -
        handle: instructor
        field:
          mode: default
          create: true
          collections:
            - people
            - externals
          display: Instructor(s)
          type: entries
          icon: entries
          listable: hidden
          instructions_position: above
          visibility: visible
      -
        handle: instructor_bio
        field:
          default: false
          display: 'Instructor bio'
          type: toggle
          icon: toggle
          width: 50
          listable: hidden
          instructions_position: above
          visibility: visible
          always_save: false
      -
        handle: instructor_contact
        field:
          default: false
          display: 'Instructor contact'
          type: toggle
          icon: toggle
          width: 50
          listable: hidden
          instructions_position: above
          visibility: visible
      -
        handle: unlisted
        field:
          default: false
          display: 'Stop future signups'
          type: toggle
          icon: toggle
          listable: hidden
          instructions_position: above
          visibility: visible
          always_save: false
      -
        handle: summary_title
        field:
          input_type: text
          antlers: false
          display: 'Summary title (optional)'
          type: text
          icon: text
          listable: hidden
          instructions_position: above
          visibility: visible
          always_save: false
axelferdinand commented 10 months ago

I tried resaving my event posts, but that didn't remove the error.

jasonvarga commented 10 months ago

Hmm no, I mean the field for that specific bard field. I think it's probably inside modules.

You can use the php please support:zip-blueprint {blueprint} command to include all the fieldsets.

axelferdinand commented 10 months ago
image

How do I use the command properly?

axelferdinand commented 10 months ago
image
axelferdinand commented 10 months ago
image
jasonvarga commented 10 months ago

Okay so can you share the modules field definition?

axelferdinand commented 10 months ago

This?

title: Modules
fields:
  -
    handle: Modules
    field:
      display: Modules
      type: section
      icon: section
      listable: hidden
  -
    handle: modules
    field:
      type: bard
      allow_internal_links: true
      display: Content
      semantic_elements: true
      container: main
      buttons:
        - h1
        - h2
        - h3
        - h4
        - bold
        - italic
        - underline
        - strikethrough
        - removeformat
        - unorderedlist
        - orderedlist
        - quote
        - title
        - subtitle1
        - lead
        - small
        - anchor
        - code
      localizable: true
      sets:
        main:
          display: Main
          instructions: null
          icon: null
          sets:
            accordion:
              display: Accordion
              instructions: 'Collapse content in an accordion.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: accordion
                -
                  import: module-settings
            box:
              display: Box
              instructions: 'Place content inside a box.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: box
                -
                  import: module-settings
            brands:
              display: Brands
              instructions: 'Display up to 100 logos.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: brands
                -
                  import: module-settings
            button:
              display: Button
              instructions: 'Add one or more buttons.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: button
                -
                  import: module-settings
            callout:
              display: Callout
              instructions: 'Highlight content.'
              icon: null
              fields:
                -
                  import: callout
                -
                  import: module-settings
            cards:
              display: Cards
              instructions: 'Dynamic or static cards with content.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: cards
                -
                  import: module-settings
            carousel:
              display: Carousel
              instructions: 'Add two or more images to a carousel.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: carousel
                -
                  import: module-settings
            contactform:
              display: 'Contact form'
              instructions: 'Display a contact form.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: contactform
                -
                  import: module-settings
            contacts:
              display: Contacts
              instructions: 'Show a selection of contacts.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: contacts
                -
                  import: module-settings
            downloads:
              display: Downloads
              instructions: 'Add downloadable assets.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: downloads
                -
                  import: module-settings
            embed:
              display: Embed
              instructions: 'Embed anything.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: embed
                -
                  import: module-settings
            events:
              display: Events
              instructions: 'List events.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: events
                -
                  import: module-settings
            grid:
              display: Grid
              instructions: 'Organize content in dynamic a grid.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: grid
            hints:
              display: Hints
              instructions: 'List hints.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: hints
                -
                  import: module-settings
            icons:
              display: Icons
              instructions: 'Add icons.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: icons
                -
                  import: module-settings
            image:
              display: Image
              instructions: 'Add image.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: image
                -
                  import: module-settings
            map:
              display: Map
              instructions: 'Display a Google Maps map.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: map
                -
                  import: module-settings
            media:
              display: Media
              instructions: 'Image + text.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: media
                -
                  import: module-settings
            module:
              display: Module
              instructions: 'Insert global module from the modules collection.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: module
                -
                  import: module-settings
            newsletter:
              display: Newsletter
              instructions: 'Insert the newsletter module.'
              icon: null
              fields:
                -
                  import: newsletter
                -
                  import: module-settings
            reports:
              display: Reports
              instructions: 'List reports.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: reports
                -
                  import: module-settings
            timeline:
              display: Schecdule
              instructions: 'Insert a timeline.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: timeline
                -
                  import: module-settings
            section:
              display: Section
              instructions: 'Divide the page in sections.'
              icon: null
              fields:
                -
                  import: section
            stats:
              display: Stats
              instructions: null
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: stats
                -
                  import: module-settings
            steps:
              display: Steps
              instructions: 'Step by step overview'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: steps
                -
                  import: module-settings
            table:
              display: Table
              instructions: 'Present content in a table.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: table
                -
                  import: module-settings
            tabs:
              display: Tabs
              instructions: 'Divide content into tabs.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: tabs
                -
                  import: module-settings
            text:
              display: Text
              instructions: 'Just text, plain or not.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: text
                -
                  import: module-settings
            title_text:
              display: 'Title + Text'
              instructions: 'Display a title with text next to it.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: title_text
                -
                  import: module-settings
            video:
              display: Video
              instructions: 'Display a video.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: video
                -
                  import: module-settings
            quote:
              display: Quote
              instructions: 'A quotation or quote.'
              icon: null
              fields:
                -
                  import: module-header
                -
                  import: quote
                -
                  import: module-settings
      listable: hidden
      always_show_set_button: false
      save_html: false
      toolbar_mode: fixed
      link_noopener: false
      link_noreferrer: false
      target_blank: false
      reading_time: false
      fullscreen: true
      allow_source: true
      enable_input_rules: true
      enable_paste_rules: true
      instructions_position: above
      antlers: false
      visibility: visible
      always_save: false
      collapse: false
      previews: true
      remove_empty_nodes: false
      smart_typography: false
      inline: false
      hide_display: false
      replicator_preview: true
      word_count: false
jasonvarga commented 10 months ago

Yes, thank you.

Is that field the only place where Virke har f appears in your content files?

axelferdinand commented 10 months ago

Yes, the only place!

axelferdinand commented 10 months ago

I can add another weird finding. In one of my other templates, I have this markup:

{{ get_content from="{url}" scope="contacts" }}
  {{ partial:contacts-item }}      
  {{ partial:modules }}
{{ /get_content }}

If I change get_content source from {url} to simply /or another fixed URL, it works fine.

axelferdinand commented 8 months ago

Any update on this? I'm now 14 versions behind 😅

jasonvarga commented 8 months ago

If you're able to share your site or create a sample repo with this reproduced, we'd be able to fix it faster.

axelferdinand commented 8 months ago

Shared with you just now! joshuablum already got access.

afonic commented 7 months ago

I also have the same error in an upgrade of a site from 3.x to 4.55.0.

For what I can see a Bard field causes this when I'm trying to json_encode it.

In Flare get an argument of $value:Statamic\Fields\Value with value <p></p> that when goes to the performAugmentation of the Bard field it gets into the convertLegacyTiptap method which somehow doesn't catch it as a string in line 515 but continues on.

I will investigate further and get back to you.

Edit: It seems like the other values passed to convertLegacyTiptap are already augmented, but this one is passed a Value object:

Statamic\Fields\Value#1
(
    [*:raw] => '<p></p>'
    [*:handle] => 'text'
    [*:fieldtype] => Statamic\Fieldtypes\Text#2
    (
        [*:field] => Statamic\Fields\Field#3
        (
            [*:handle] => 'text'
            [*:prefix] => null
            [*:config] => [            
                'antlers' => false,
            ]
            [*:value] => null
            [*:parent] => null
            [*:parentField] => null
            [*:parentIndex] => null
            [*:validationContext] => null
            [*:form] => null
        )
        [*:localizable] => true
        [*:validatable] => true
        [*:defaultable] => true
        [*:selectable] => true
        [*:selectableInForms] => true
        [*:relationship] => false
        [*:categories] => [        
            0 => 'text',
        ]
        [*:rules] => [],
        [*:extraRules] => [],
        [*:defaultValue] => null
        [*:configFields] => [],
        [*:icon] => null
    )
    [*:augmentable] => null
    [*:shallow] => false
)

Edit 2:

If I add

if ($value instanceof \Statamic\Fields\Value) {
    $value = $value->value();
}

at the top of the convertLegacyTiptap method this is fixed and the rest of the json_encode works (meaning the data gets passed as it used to in v3). I would PR but I feel this has to be fixed elsewhere.

axelferdinand commented 7 months ago

Any news on this? I now have multiple sites that I can't upgrade until this is fixed – locked on "statamic/cms": "4.42.0"

duncanmcclean commented 7 months ago

Any news on this? I now have multiple sites that I can't upgrade until this is fixed – locked on "statamic/cms": "4.42.0"

Sorry, no news yet. We've been focusing on v5 for the last couple of weeks. We'll update this issue when we have an update.

axelferdinand commented 7 months ago

Thank you @duncanmcclean !

duncanmcclean commented 6 months ago

Quick update: I've managed to track down the cause of this issue and I've opened a PR to fix it, see #10104.

axelferdinand commented 6 months ago

Thank you 🙏

fre. 17. mai 2024 kl. 19:49 skrev Duncan McClean @.***>:

Quick update: I've managed to track down the cause of this issue and I've opened a PR to fix it, see #10104 https://github.com/statamic/cms/pull/10104.

— Reply to this email directly, view it on GitHub https://github.com/statamic/cms/issues/9352#issuecomment-2117300645, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPZ5RX4AQMTHC65WUNXQE3ZCXOCJAVCNFSM6AAAAABCALKAAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJXGMYDANRUGU . You are receiving this because you authored the thread.Message ID: @.***>

duncanmcclean commented 5 months ago

Re-opening since this still seems to be an issue, see comment on related PR: https://github.com/statamic/cms/pull/10104#issuecomment-2169261934

afonic commented 5 months ago

Can I help somehow with closing this?

As I said in the PR Duncan's fixed worked, the later change from Jason broke it again.

duncanmcclean commented 2 months ago

Can I help somehow with closing this?

Sorry for the delay in responding. Are you able to provide access to your site?

afonic commented 2 months ago

Hey Duncan, give me a couple of days to reproduce it and I'll message you with access to a site that this happens.