Jump to content

Spacious ACP/Widgets


Recommended Posts

Getting this error...

Locked Task: spaciousPatchCheck

One of the routine maintenance tasks which run in the background has failed several times, which may indicate a configuration issue.

  • Application/Plugin
    Spacious ACP
  • Task
    spaciousPatchCheck
  • Last Run
    Sunday at 02:32 PM

You should check the logs for any indication of the issue or attempt to run it manually. If the task does not run successfully you should contact the author of the application/plugin for further assistance.

Error: Access to undeclared static property: IPS\Application::$ipsApps (0)
#0 /var/www/vhosts/<domain>/system/Task/Task.php(266): IPS\spaciouswidgets\tasks\_spaciousPatchCheck->execute()
#1 /var/www/vhosts/<domain>/applications/core/modules/admin/settings/advanced.php(729): IPS\_Task->run()
#2 /var/www/vhosts/<domain>/system/Dispatcher/Controller.php(90): IPS\core\modules\admin\settings\_advanced->runTask()
#3 /var/www/vhosts/<domain>/applications/core/modules/admin/settings/advanced.php(38): IPS\Dispatcher\_Controller->execute()
#4 /var/www/vhosts/<domain>/system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\settings\_advanced->execute()
#5 /var/www/vhosts/<domain>/main/index.php(13): IPS\_Dispatcher->run()
#6 {main}

Using IPS Forum v4.6.3 & Spacious ACP v20.1.2

Edited by Daveo16
Link to comment

Well that's a little on the odd side.  Obligatory running fine locally and on all my sites. I even ran it manually; t'was fine.

The only interaction with IPS\Application is in getting the Core versions: 

\IPS\Application::load('core')->long_version , and then same but just version

Doing so will probably (maybe?) hit that $ipsApps var in those methods so that's where that's coming from - though looking it seems to be a side-ways hit at best (maybe when constructing the app obj. via load) 

As to why on your site? What version of Invision Community are you on? EDIT: Also are you self hosted or CIC?

And to be further confusing, the var is actually set as a public static var in init.php so that's pretty much the definition of always available.

Edited by All Astronauts
Link to comment

Ya know, just go to the task page and run it manually. If you don't have Spacious set up to put the tasks button on the Dashboard page, go to advanced settings bit in the settings area in the ACP - the first tab there, where you choose to run tasks with user traffic or cron or an outside service - just beneath that is a text link to the tasks page.

Link to comment
  • 1 month later...
  • NEW! Content Trends dashboard widget
  • FIXED! CSS for customization - login page - login page preview invert logo not applying
  • FIXED! Spacious IPS patches task was breaking on a global variable not being fully rebuilt quickly enough in 4.6.x., also, button was not showing unless you had the admin or mod log buttons turned on in settings.
  • FIXED! Highest historic server load wasn't being set in the monitoring task, only while viewing System Overview widget on the dashboard.
  • UPGRADE PROCESS! Removes legacy task.

This is for the pending approval 20.2 version.

Content Trends is on a 24 hour period based on when the task runs. To truly do a completely date/time accurate content stat thing would require some brutal iteration on every app and what is considered "content". IPS already records this in a round-about way by incrementing every member's total content count. So this just runs on that. Obviously this means content generated by guests is not included (does anyone allow guests to do anything anymore? Did they ever?). Also stating the obvious that you probably shouldn't bother to put this widget up for at least a week. Graphs tend to look ridiculous with only a data point or two of data. Let the task cook for a week or so then throw the widget up. I think I'm borrowing one of the graph settings from the member Trends widget. I've got note down to let you set that separately eventually.

The IPS patches button I got for Spacious was slightly bugged. Many of you never encountered them ever but this should resolve those. One was me derping out the button's appearance completely - you previous needed either the administrators or moderators log button enabled for the patch button to ever show. That's fixed. The other *should* be resolved. Best I (and another...) can figure is its some weird ghost thing going on with caching "somewhere" $ipsApps is a pretty pure, always there global variable that's runs on init.php - you don't get much more bulletproof than that. So why it was erroring on that ever-present variable when one called \IPS\Application::load('core') twice in the space of three lines? Ehhh... (obligatory shrug emote) - I just do a single load now and read off that var and that probably??? has solved the problem.

Oh, and I sideways caught that highest load not updating correctly in the System Overview widget. Just a miss on my part.

Think that's it. Available when available.

Oh, and I still haven't updated the MP description aside from the screenshots in like two years now. On it.

Screens with patches button working and the new CT widget:

ptchs.PNG.e8eba5eeed72b5c749ff217746ba9fe6.PNG

Keen eyes will spot that highest recorded load in the background. That's what you get when your dedicated VPS is failing 🙂

ct.PNG.44f8896e6e1dd035763bdbf6e3b90d2d.PNG

Like I said, you'll need to let this cook for awhile. Looks derpy with just a few datapoints. Graph I think is limited to 30 days. As mentioned earlier, I'll get the settings to make that configurable in a future update.

Link to comment
  • 3 weeks later...

I have found a rather interesting bug.

When you go to the Admin Control Panel as a restricted Administrator (ACP -> Members -> Staff -> Administrators) on a user (Not sure about group) That user will get a permission error when trying to view the dashboard:

2S107/2 The page you are trying to access is not available for your account.

Disabling the SpaciousACP app allows the restricted Administrator to see the dashboard; albeit vanilla. Setting the Administrator to unrestricted seems to fix it as well.

The Bug? Even if you set the group - or in this case user - to restricted even if every permission box was ticked (And I mean every single one, under every tab, every expanded option, etc) it would still throw the permission error 2S107/2. The only thing that seems to affect it is setting the user in the Admin settings to "Unrestricted", it doesn't matter if it's effectively unrestricted or not. 

This, at least to me, doesn't seem intentional.

Link to comment

Permission check in a dashboard widget needed to be specified to the "core" app. For regular every-day Administrators it doesn't matter - they get everything all the time. When you have *any* other kind of admin, now the permission checks actually matter, and get checked. For the Admin Logs dashboard widget, I got a check there so scrub admins don't see something there that might leak out - dunno what but thought it best to slap the permission on there. 

\IPS\Dispatcher::i()->checkAcpPermission( 'restrictions_adminlogs');

Fine if the containing app is Core, not so much if its not

\IPS\Dispatcher::i()->checkAcpPermission( 'restrictions_adminlogs', 'core', 'staff' );

There we go.

Ahh! But I see you thinking - what if that scrub admin has that permission toggled off? Yep, same problem.

So two things:

1) ACP permission checks using the dispatcher method above to allow/not allow dashboard widget display are a no-go; will disallow the entire dashboard.

2) Instead, use this:

\IPS\Member::loggedIn()->hasAcpRestriction( 'core', 'staff', 'restrictions_adminlogs' )

100% chance I just copy-pasta'd the dispatcher check from the admin logs page itself while creating that dashboard widget and never thought twice about it - til now...

If you need this fixed fast lemme know so I can - well - hmm - I'd want to say I'd submit a ticket but that's going away now - that was the way when we needed to request a quick marketplace approval for a bug fix that had to get out.

Lemme know, I'll submit the new version in a moment, and if you need it ASAP I'll yell at someone or something.

Link to comment

I am getting this error when visiting the AdminCP dashboard

DivisionByZeroError: Division by zero (0)
#0 /var/www/vhosts/**.it/forum.**.it/applications/spaciouswidgets/extensions/core/Dashboard/systemOverview.php(103): IPS\spaciouswidgets\_Spacious::systemLocalDriveInfo()
#1 /var/www/vhosts/**.it/forum.**.it/applications/core/modules/admin/overview/dashboard.php(64): IPS\spaciouswidgets\extensions\core\Dashboard\_systemOverview->getBlock()
#2 /var/www/vhosts/**.it/forum.**.it/system/Dispatcher/Controller.php(101): IPS\core\modules\admin\overview\_dashboard->manage()
#3 /var/www/vhosts/**.it/forum.**.it/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute()
#4 /var/www/vhosts/**.it/forum.**.it/admin/index.php(13): IPS\_Dispatcher->run()
#5 {main}
  • Self Hosted
  • IP.Board: 4.6.6
  • PHP: 8.0.10
  • Database: v5.5.5-10.3.31-MariaDB-0ubuntu0.20.04.1

Let me know if you need more data...

Link to comment

20.3.0 Available!

  • Removed un-needed csrf in url in ACP Journal Dashboard widget
  • Added ability to reset highest CPU load in Server Overview widget settings
  • FIX! Permission check on Admin Logs dashboard widget for admins not in the Administrators group

Mostly just a few tweaks - no biggie. The reset button for the highest load point I added mainly because one site of mine had a failing VPS that registered a crushing load of 900%+ before it killed. No sense staring at that historic outlier in the widget all the time and once things are back to normal you'll want to see what the "new high" is anyways.

FYI the post above, we worked that problem minutes after the post. A particularly rare occurrence where, and I'll admit I'm guessing here as it's fixed, is that for a low level PHP call - disk_total_space (and probably disk_free_space as well), the account he was running Invision Community under would not allow you to hit '/' (aka the root directory). You can throw any directory at those commands and it will give you what you need (it is looking at the drive, not the space in whatever directory you point it at). Just changing the root slash to the directory where IC is installed resolved this. The stupid weird thing is he has another site running on the exact same server. No problems there. And - what has it been - nearly a decade of this stuff already, and this is the first time this has ever popped up. Wild.

The fix for the above is NOT in this release. Not really worth it to bug staff to kill the current submission (now approved)  when approvals are averaging a week-ish these days so this fix that effects pretty much one site will be a bit. I'm putting a few more safeties in places and gonna check my dev notes to see if there was anything small I wanted to throw in before pushing another release.

Link to comment
  • 1 month later...

Good day,

I would like to report a problem with Spacious ACP. I've been using it for quite some time now and I love it. However, I believe there is a problem with IPS patch notifications. I assume that the "PATCH AVAILABLE" button added to the ACP tells us if there is a new patch available. It works. However, the patch button will stay there even if the update has been installed. I click on it, and I see the last system update that I installed. 

Is there a way to fix that? Once the patch has been installed, hide the patch available or "ghost it". It would be great that if there was one patch the button would be selectable and in maybe "red" colour so that it stands out.

Thanks so much for your great work and support.

 

image.thumb.png.46719034178dd112e7d2ede9ec82d645.png

Link to comment
  • 2 weeks later...

Haven't seen a patch for IPS stuff in awhile so that's still on hold. If they keep up with the monthly releases (which remains to be seen, it's changed before... - strong vote for quarterlies here), the necessity of the patch alert button is lessor. Still, just waitin' for a patch to show up.

Anyways...

Version 20.4 Submitted!
NEW! Added ElasticSearch tab to the System Overview Dashboard widget
NEW! Finally made the the Content Trends Dashboard widget configurable on days.

sysovelastic.JPG.f75e6aa1bcd9ec1afa134e48d1a0fe51.JPG

Nothing really, just pings your ES instance and gives you what what. Purposely NOT getting the health results: when you have a single node its always alert status yellow and this will be common for single Invision Community installs and I don't wanna be explaining alert levels and such right now. Later though, yes, its on my radar - its really nothing to stick in but IPS might beat me to it first on the support page where it kinda makes sense. Mostly this is just a quick way to make sure you are alright with IPS requirements - the latest Invision Community in beta right now has the minimum version bumped to 7.2 (which is still like 2019-era ES).

Anyways, there's that and the Content Trends Dashboard widget now has configurable days look back. Most of you should be just getting past 30, 40, 50 days or whatever now so maybe you want to truncate that. Me, I'm letting it rip on my sites.

Secret BF drop in price of $5. Viewers will get a drop too, as will KS (which also has a small update pending).

This update available when you see it approved of course. Something something holidays and so on etc. as far as time-lines on that go.

Link to comment

The custom logo on the login page is max-height 150px with the width forced to auto so it should??? scale. I'll test locally with some outsized ratio images.

The CSS is because I believe I never considered someone would want a full-colored logo for the login box. My bad. Here's some vague copyright violatin' examples (though transformative so let's just call it slightly transgressive - I should just do this on my sites in general to freak people out 🙂 )

Before:

q.JPG.913486484c0d822328d14c494392c84b.JPG

After

qq.JPG.ef5d3d4f079dc82c91878c04bcd00728.JPG

Next version down the line this stuff will be patched/enhanced. Thx.

EDIT: I see the logo width problem on mobile - that one is mine. The CSS you pasted? That's actually IPS CSS but I'll have to work around that for the logos; no biggie.

Edited by All Astronauts
Link to comment

@Joey_M You're in luck, @Daniel F caught me spacing out on ES servers not all being localhosts so the update was pulled and resubmitted to patch. 

This also includes a patch for some Linux user accounts not having proper permissions to do some things in regards to the System Overview stuff.

And since I was re-submitting, I got your fixes in too.

  • NEW! Added ElasticSearch tab to the System Overview Dashboard widget
  • NEW! Finally made the the Content Trends Dashboard widget configurable on days.
  • FIX! Rare Linux user account permissions problem accessing some system stats. Should be patched...
  • FIX! Custom logos on login page now scale correctly on mobile. IPS CSS over-ridden to allow full color logos on dark mode.
Edited by All Astronauts
Link to comment

20.3 has been out for awhile now - its 20.4 you should be looking out for.

I ran into some chop with a possibly (probably?) broken IPS error exception thingy. I just had to change the error catch to something that would be actually caught otherwise this update would break if you did not have any Elasticsearch installed/called so the update was nulled. It was re-submitted just now.

Link to comment
Error: Undefined constant "IPS\Theme\spacious_lp_boxtrans" (0)
#0 /home/admin/domains/justified.co/public_html/system/Theme/Theme.php(5348): IPS\Theme\css_spaciouswidgets_admin___spaciouslogin_css()
#1 /home/admin/domains/justified.co/public_html/system/Theme/Theme.php(2543): IPS\_Theme::writeCss()
#2 /home/admin/domains/justified.co/public_html/system/Theme/Theme.php(621): IPS\_Theme->compileCss()
#3 /home/admin/domains/justified.co/public_html/applications/spaciouswidgets/modules/admin/spaciouswidgets/customization.php(96): IPS\_Theme->css()
#4 /home/admin/domains/justified.co/public_html/system/Dispatcher/Controller.php(101): IPS\spaciouswidgets\modules\admin\spaciouswidgets\_customization->manage()
#5 /home/admin/domains/justified.co/public_html/applications/spaciouswidgets/modules/admin/spaciouswidgets/customization.php(33): IPS\Dispatcher\_Controller->execute()
#6 /home/admin/domains/justified.co/public_html/system/Dispatcher/Dispatcher.php(153): IPS\spaciouswidgets\modules\admin\spaciouswidgets\_customization->execute()
#7 /home/admin/domains/justified.co/public_html/admin/index.php(13): IPS\_Dispatcher->run()
#8 {main}

 Having this error admin/?app=spaciouswidgets&module=spaciouswidgets&controller=customization&tab=loginpage

Edited by Iyda
Link to comment

Can you go to the ACP, AA tab, Spacious ACP - Customization - Login Page tab, then make sure the below circle setting has something there, then save.

sdfgdfg.thumb.JPG.060f4a09afb8321d4fac88ee5dac79ba.JPG

This setting has been in Spacious forever and ever and it seems like when it installed it didn't take? Do that or perhaps first use the support tool to clear caches to force the IPS settings stuff to reset

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...