Skip to content

Commit 9baef12

Browse files
committed
Fix for errors in Request Info panel for some core module settings pages.
1 parent 097d4a4 commit 9baef12

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

TracyDebugger.module

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class TracyDebugger extends WireData implements Module, ConfigurableModule {
3232
'summary' => __('Tracy debugger from Nette with several PW specific custom tools.', __FILE__),
3333
'author' => 'Adrian Jones',
3434
'href' => 'https://processwire.com/talk/topic/12208-tracy-debugger/',
35-
'version' => '4.9.18',
35+
'version' => '4.9.19',
3636
'autoload' => true,
3737
'singular' => true,
3838
'requires' => 'ProcessWire>=2.7.2, PHP>=5.4.4',

panels/RequestInfoPanel.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,14 @@ public function getPanel() {
167167
if($this->wire('input')->get('name') && $this->wire('page')->process == 'ProcessModule') {
168168
$moduleName = $this->wire('sanitizer')->name($this->wire('input')->get('name'));
169169
if($this->wire('modules')->isInstalled($moduleName)) {
170-
$module = $this->wire('modules')->get($moduleName);
170+
// get was causing problems with some core modules like ProcessPageEdit and ProcessPageEditImageSelect
171+
// resulting in a "No page specified" error
172+
try {
173+
$moduleConfigData = $this->wire('modules')->get($moduleName);
174+
}
175+
catch(\Exception $e) {
176+
$moduleConfigData = $this->wire('modules')->getModuleConfigData($moduleName);
177+
}
171178
$moduleSettings = '
172179
<table>';
173180
foreach($this->wire('modules')->getModuleInfoVerbose($moduleName) as $k => $v) {
@@ -178,7 +185,7 @@ public function getPanel() {
178185
</tr>
179186
';
180187
}
181-
foreach($module->getArray() as $k => $v) {
188+
foreach($moduleConfigData as $k => $v) {
182189
$moduleSettings .= '
183190
<tr>
184191
<td>'.$k.'</td>

0 commit comments

Comments
 (0)