processwire-issues
processwire-issues copied to clipboard
Uncaught TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in wire/core/Process.php:254
Short description of the issue
FieldTypeRepeaterMatrix does not work anymore an error in the network console for /cms-admin/page/edit/?id=1558&field=offers&repeater_edit=1560 is thrown
Expected behavior
When open the tab in the admin area it displays the content
Actual behavior
The tab does not open anymore; it just shown a loading sign; exception thrown:
Warning: Array to string conversion in /vendor/processwire/processwire/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module on line 3346
Not again… Fatal Error: Uncaught TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in wire/core/Process.php:254
#0 wire/core/Process.php (254): strpos(Array, '/')
#1 wire/core/Wire.php (419): Process->___breadcrumb('./?id=1558', Array)
#2 wire/core/WireHooks.php (968): Wire->_callMethod('___breadcrumb', Array)
#3 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessPageEdit), 'breadcrumb', Array)
#4 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (3411): Wire->__call('breadcrumb', Array)
#5 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (455): ProcessPageEdit->setupBreadcrumbs()
#6 wire/core/ModulesLoader.php (168): ProcessPageEdit->init()
#7 wire/core/Modules.php (625): ModulesLoader->initModule(Object(ProcessPageEdit), Array)
#8 wire/core/ProcessController.php (178): Modules->getModule('ProcessPageEdit', Array)
#9 wire/core/ProcessController.php (334): ProcessController->getProcess()
#10 wire/core/Wire.php (413): ProcessController->___execute()
#11 wire/core/WireHooks.php (968): Wire->_callMethod('___execute', Array)
#12 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessController), 'execute', Array)
#13 wire/core/admin.php (174): Wire->__call('execute', Array)
#14 wire/modules/AdminTheme/AdminThemeUikit/controller.php (15): require('/Users/XXX/P...')
#15 site/templates/admin.php (17): require('/Users/XXX/P...')
#16 wire/core/TemplateFile.php (328): require('/Users/XXX/P...')
#17 wire/core/Wire.php (413): TemplateFile->___render()
#18 wire/core/WireHooks.php (968): Wire->_callMethod('___render', Array)
#19 wire/core/Wire.php (484): WireHooks->runHooks(Object(TemplateFile), 'render', Array)
#20 wire/modules/PageRender.module (581): Wire->__call('render', Array)
#21 wire/core/Wire.php (416): PageRender->___renderPage(Object(HookEvent))
#22 wire/core/WireHooks.php (968): Wire->_callMethod('___renderPage', Array)
#23 wire/core/Wire.php (484): WireHooks->runHooks(Object(PageRender), 'renderPage', Array)
#24 wire/core/WireHooks.php (1094): Wire->__call('renderPage', Array)
#25 wire/core/Wire.php (484): WireHooks->runHooks(Object(Page), 'render', Array)
#26 wire/modules/Process/ProcessPageView.module (184): Wire->__call('render', Array)
#27 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage(Object(Page), Object(PagesRequest))
#28 wire/core/Wire.php (416): ProcessPageView->___execute(true)
#29 wire/core/WireHooks.php (968): Wire->_callMethod('___execute', Array)
#30 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array)
#31 index.php (66): Wire->__call('execute', Array)
#32 {main}
thrown (line 254 of wire/core/Process.php)
Optional: Screenshots/Links that demonstrate the issue
Setup/Environment
- ProcessWire version: 240 (my check says bug was introduced with between 236 and 237)
- PHP version: 8.1
@saschanos This was an issue in RepeaterMatrix. Do you have access to the ProFields support boards? There an updated file that fixes it posted here
@ryancramerdesign, great. Would it be possible to create a new version which contains the fix? I think it will make it more easy for everyone to use it :).
@ryancramerdesign, is there any update? :)
@saschanos, I'm closing this one as it's not a core issue. Please use the ProFields support board.
@matjazpotocnik, modules/Process/ProcessPageEdit/ProcessPageEdit.module is a core module :(
@saschanos, yes, of course, but Ryan said that this was an issue in RepeaterMatrix?
Okay. So I need to create another issue there or will you handle it internally?
What do you mean internally? Only Ryan offers support for pro modules. Can't you download the modified file from the link Ryan provided?
Issue is still existing; answered in the thread provided by Ryan. Have a nice weekend!
I'm going to re-open because it looks like the issue started between core versions. I don't know if it's a core or Matrix issue, but starting as a result of a core upgrade points more to potential core issue. @saschanos Can you describe the steps necessary to reproduce the issue?
- Edit page
- Edit field from type "repeaterMatrix"
- Edit child containing the following fields (screenshot-1)
- when now opening the repeater "offers" (which is a repeater; fields see screenshot-2) the error above is produced
@saschanos can you try the latest dev 3.0.245, there is a commit https://github.com/processwire/processwire/commit/1805ad0a599156bba34b72e6104abad8d4cd3417 that might solve the issue. Please report back.
Works perfect. Thank you! <3