processwire / processwire-issues

ProcessWire issue reports.
45 stars 2 forks source link

Uncaught TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in wire/core/Process.php:254 #1954

Open saschanos opened 4 months ago

saschanos commented 4 months ago

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

Bildschirmfoto 2024-07-25 um 12 37 27

Setup/Environment

ryancramerdesign commented 3 months ago

@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

saschanos commented 3 months ago

@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 :).

saschanos commented 1 month ago

@ryancramerdesign, is there any update? :)