daun / processwire-dashboard Goto Github PK
View Code? Open in Web Editor NEWConfigurable dashboard for ProcessWire's admin interface
Home Page: https://daun.github.io/processwire-dashboard/
License: GNU General Public License v3.0
Configurable dashboard for ProcessWire's admin interface
Home Page: https://daun.github.io/processwire-dashboard/
License: GNU General Public License v3.0
Describe the bug
restoreLocales() is passing $category as a string to setlocale when it is set by the line below. These need to be cast to integers.
Context
Describe the bug
When I use the shortcuts with external links, I always get an error
PHP Notice: Trying to get property 'url' of non-object in ...\site\modules\Dashboard\DashboardPanelShortcuts.module:226
To Reproduce
Add an external Link to the DashboardPanelShortcuts
Additional context
I think the check doesn't fit that way (line 226):
if (!$page || !$page->url) {
Because if "$page" does not exist, then "$page->url" will cause an error.
https://processwire.com/talk/topic/22847-processwire-dashboard/page/7/
The page list panel level-1 pages spacing feels a bit too far to the left and inconsistent with the other panels, as seen in this screenshot:
https://github.com/philippdaun/processwire-dashboard/raw/master/images/page-list.png
Can the following adjustment be added to DashboardPanelPageList.css?
.AdminThemeUikit .DashboardPanelPageList .PageList > .PageListItem {
padding-left: 20px !important;
}
Describe the bug
I have TracyDebugger switched on quite a lot of the time on my account.
If you change the main admin page process from ProcessHome to Dashbord, in Chrome dev console, if you wait a minute it throws this error:
Fatal Error: Uncaught Exception: Missing parameter: key in /site/modules/Dashboard/Dashboard.module:300
#0 /site/modules/Dashboard/Dashboard.module(234): Daun\Dashboard\Dashboard->renderInstanceByKey(NULL, NULL)
#1 /wire/core/Wire.php(414): Daun\Dashboard\Dashboard->___execute()
#2 /wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod('___execute', Array)
#3 /wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks(Object(Daun\Dashboard\Dashboard), 'execute', Array)
#4 /wire/core/ProcessController.php(337): ProcessWire\Wire->__call('execute', Array)
#5 /wire/core/Wire.php(414): ProcessWire\ProcessController->___execute()
#6 /wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod('___execute', Array)
#7 /var/www/htm (line 300 of /site/modules/Dashboard/Dashboard.module)
This error message was shown because: you are logged in as a Superuser. Error has been logged.
It doesn't matter if you have Tracy "on" or minimised in the bottom-right, if Tracy is running it throws that error after a minute or two.
I wasn't sure whether to list it as an issue with this module or on the Tracy module Github page, but I think this is the first module I've seen this sort of error with before so I've posted it here for now - I hope that's alright?
I think a "simple" fix here would be for whatever background JS call is running on the dashboard to simply not run if Tracy is running? Because in theory on a live website Tracy would be switched off.
To Reproduce
Change /admin/ to use Dashboard as its process
Context
Latest ProcessWire dev branch
TracyDebugger installed
I'm using the latest version of the module on the latest version of ProcessWire.
I created a number
panel and I get this error:
Fatal Error: Uncaught Error: Class 'NumberFormatter' not found in DashboardPanelNumber.module:43
I think it's related to this:
https://stackoverflow.com/questions/30554177/fatal-error-class-numberformatter-not-found
Although I could probably fix it by enabling particular things in php.ini and so forth (I'm using php 7.2), a typical LAMP setup does not have that enabled by default which could be problematic for others.
I wonder what your thoughts are.
Describe the bug
In DashboardPanelCollection.module, the Edit icon is not displayed because a FontAwesome class is specified that does not exist.
Fix
Problem is line #L458. Change from "pen-to-square" to "pencil"
Context
Version Dashboard 1.4.0
Hi. Not a huge problem, mostly annoyance while debug mode is on, but still:
If using the add-new
panel type but the "Add pages" (Bookmarks) are empty (none addable exist or user doesn't have permission to add any pages) - it throws a notice:
Notice: Undefined variable: content in ..\Dashboard\views\panel.php on line 22
For now I just wrapped the whole output in panel.php
with <?php if( isset($content) ): ?>
but probably you'll do something more robust.
Was using the simplest call in the \site\templates\admin.php
:
$panels->add([
'panel' => 'add-new',
'title' => 'Add new page',
'data' => [
'display' => 'list'
]
]);
Hello,
There is a small bug in the "Number" module, the following error is displayed in Tracy:
PHP Notice: Undefined variable: trend in .../Dashboard/views/panels/number.php:1
Fix:
Change the first line in "number.php" to:
<div class="DashboardPanelNumber__content" data-trend="<?php echo (isset($trend)) ? htmlspecialchars($trend) : ""; ?>">
Getting error Filename D:/development/cms/site/modules/Dashboard/views/dashboard.php is not in an allowed path
I'm using a multisite setup. My site modules folders reside in their respective folders /site-sitename/modules. I'm not sure, this could be a php related problem but in my case I managed to fix it by replacing the path of the views folder in Dashboard.module:132 (and DashboardPanel.class.php:89). I'd rather not alter the module for updating purposes. Any ideas?
$this->viewFolder = __DIR__.'/views/';
$this->viewFolder = $this->config->paths->siteModules.'Dashboard/views/';
And of course; awesome module!
Describe the bug
The dashboard is set to be the start page (/processwire/dashboard/) of ProcessWire (backend). When deleting files from the trash in the page listing (/processwire/page/) a redirect occurs which redirects to the dashboard and therefore doesn't stay on the page listing.
To Reproduce
PW Dashboard needs to be set as start page in the backend.
Deleting pages from the trash (which is only available in the page listing /processwire/page/) redirects to the startpage (/processwire/dashboard/).
Expected behavior
Deleting pages from the trash (/processwire/page/)
a) doesn't trigger a redirect (which might be PW specific) or
b) it stays on or redirects to the page listing (/processwire/page/)
Context
Is it critical?
No, absolutely not. Just unexpected behaviour. Only ever noticed right now after months and months of using this module.
Running dashboard under PHP 8.1, there is a deprecation warning:
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in ...\site\modules\Dashboard\DashboardPanelCollection.module on line 110
Could you please fix this? It should be simply by using the null coalescing operator:
if (strpos($label ?? '', 'fa-') === 0) {
Thank you and best regards,
Thomas.
Describe the bug
PHP Deprecated: Creation of dynamic property
To Reproduce
Load the dashboard on a site running PHP 8.2
Expected behavior
No deprecation error
Screenshots
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$viewFolder is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:89
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$name is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:211
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$class is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:212
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$size is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:214
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$style is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:215
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$align is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:216
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$templateFile is deprecated in .../site/modules/Dashboard/DashboardPanelTemplate.module:69
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$templatePath is deprecated in .../site/modules/Dashboard/DashboardPanelTemplate.module:70
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$variables is deprecated in .../site/modules/Dashboard/DashboardPanelTemplate.module:71
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$viewFolder is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:89
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$name is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:211
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$class is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:212
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$size is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:214
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$style is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:215
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$align is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:216
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$locale is deprecated in .../site/modules/Dashboard/DashboardPanelNumber.module:41
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$detail is deprecated in .../site/modules/Dashboard/DashboardPanelNumber.module:42
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$number is deprecated in .../site/modules/Dashboard/DashboardPanelNumber.module:43
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$trend is deprecated in .../site/modules/Dashboard/DashboardPanelNumber.module:44
Context
For server-side issues, include the relevant information:
Additional context
Simplest solution is probably: #[AllowDynamicProperties]
https://stackoverflow.com/questions/74991682/php-8-2-dynamic-properties-deprecated-how-to-use-them-anyway-in-a-compatible-wa
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.