Jump to content

CodingJungle

Clients
  • Posts

    3,066
  • Joined

  • Days Won

    31

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Everything posted by CodingJungle

  1. happens in php 8.0.x too, i just ended up deleting the property and its use in the constructor, as it doesn't appear to be used any where else in the file.
  2. appears to be working, i have a new version coming out but the upgrades for stratagem and babble took longer so i was unable to get it out and tested before the 4.7 update dropped. i didn't want to push a "maintenance" release just to update the version compatibility to 4.7 with a new version right around the corner.
  3. did you regenerate the stratagem.js and packages.json? upload them both to the node server, and run npm update and then restart the stratagem.js in node.js. i updated stratagem's socket.io to the latest version, which changed a few things in the handshake.
  4. okay i'll test it out and release a fix as soon as possible for it.
  5. i'm not sure i follow what you are asking? are you asking does it send to all the alts too? or just to the "primary" account? it doesn't do a "group" message if that is what you are asking. sorry, holiday weekend i was not at home.
  6. RuntimeException thrown with message "You are missing protected static $instance=null; property in your class IPS\core\DataLayer" Stacktrace: #10 RuntimeException in /opt/homebrew/var/www/dev/init.php:920 #9 IPS\Patterns\toolbox_hook_Singleton:__construct in /opt/homebrew/var/www/dev/applications/core/sources/DataLayer/DataLayer.php:561 #8 IPS\core\_DataLayer:i in /opt/homebrew/var/www/dev/system/Output/Output.php:815 #7 IPS\_Output:sendOutput in /opt/homebrew/var/www/dev/init.php:920 #6 IPS\toolbox_hook_Output:sendOutput in /opt/homebrew/var/www/dev/system/Output/Output.php:1182 #5 IPS\_Output:redirect in /opt/homebrew/var/www/dev/applications/core/modules/admin/support/support.php:1013 #4 IPS\core\modules\admin\support\_support:clearCaches in /opt/homebrew/var/www/dev/system/Dispatcher/Controller.php:107 #3 IPS\Dispatcher\_Controller:execute in /opt/homebrew/var/www/dev/applications/core/modules/admin/support/support.php:48 #2 IPS\core\modules\admin\support\_support:execute in /opt/homebrew/var/www/dev/system/Dispatcher/Dispatcher.php:153 #1 IPS\_Dispatcher:run in /opt/homebrew/var/www/dev/init.php:920 #0 IPS\Dispatcher\toolbox_hook_dispatcherStandard:run in /opt/homebrew/var/www/dev/admin/index.php:13 this isn't an error the suite normally throws on its own, but it is something i added awhile back to my toolbox app to check if anything that extends \IPS\Patterns\SIngleton has this property, as it can cause problems that leave you chasing your tail if its not defined in the sub-class.
  7. yeah, i figured this would be a good short term solution till they figured things out, but that might've been some wishful thinking on my part.
  8. This form helper doesn't seem to work with unlimitedToggleOn, since it is a child class of IPS\Helpers\Form\Select, setting up the unlimitedToggleOn option like i would for a Select doesn't seem to have any effect. the problem seems to be in the template of of cbs, i add this the unlimited checkbox template to test things out: {{if \count( $unlimitedToggles )}}data-control="toggle" {{if $toggleOn === FALSE}}data-togglesOff{{else}}data-togglesOn{{endif}}="{expression="implode( ',', $unlimitedToggles )"}" aria-controls="{expression="implode( ',', $unlimitedToggles )"}"{{endif}} it fixed the issue.
  9. this isn't really a bug, but a suggestion. add in the ability to pass a join. I have greatly ignored this form helper in my apps mostly cause of this reason. there are times where being able to add a join is needed for returned results (not to display, but to validate them. like a use case for me, to check to see if item exist in a mapped table to see if it is being used by another app).
  10. if you use ips.ui.dialog.create() to create the dialog programmatically, then desctructOnClose doesn't completely remove the dialog once it is closed, as it is expecting an element, cause the internal hide() method calls the object if( options.destructOnClose ){ ips.ui.dialog.destruct(elem); } since there is no element when using ips.ui.dialog.create(), there is nothing for ips.ui.dialog.destruct() to do, so parts of the dialog window remains in the DOM.
  11. the salt is apart of the password hash in the encryption scheme IPS 4 uses. $2y$10$ykiLOC/Lu24CIGUiJmH.1eYlIRvdfBhrd2qEBukwU4Qjmx1UWM96e the hashing algo used knows what to use as the salt when you go to compare the passwords to see if they match.
  12. template looks fine, i'm assuming the other 3 templates being called are also clean? have you checked the server error log to see if it gives any more information? from what i can tell, one of the plugins templates is causing the eval to throw an error (it might not even be your plugin that is the culprit, cause any plugin with a template is gonna be apart of that template group).
  13. what is the content of the template if you don't mind posting it? cause looking at the code for getTemplate, it throws that exception in one place, and it is a ParseError from eval'ing the template group, so it might be something in the template.
  14. updating one of my apps, i decided to give the the JS a good dusting to see where i could improve it cause it was a bit long in the tooth. I noticed i was using my own $.Deferred code to know when the animation was done executing (i'm using ips.utils.anim.go() for some of the animation and jquery ui for some of the others). I couldn't exactly remember why i had setup my own defer, so i tested it out. i removed mine, placed a .promise().done() on the jquery ui effects i was using, worked as expected, then i moved onto the IPS ones and it was not working as expected. the promise is returned instantly, long before the animation is done executing. i tested out a few things, but the same result. I went searching for instances where in your code you are waiting for the defer before executing some code, and my code was virtually identical. the expected is the promise to be returned when the animation is done executing like it is done in jquery, other wise there is little value to deferring it in the first place if it is instantly going to return the promise long before the animation is done.
  15. my best guess, is $this->key is either empty or its not the name of the template, try setting the name of the template there instead of using $this->key in: $this->template( array( \IPS\Theme::i()->getTemplate( 'plugins', 'core', 'global' ), $this->key ) ); (as the template class will throw an unexpectevalueexception if it can't find the template group)
  16. that only applies to applications, not plugins. it checks to see if the $app property is populated, plugins that property is empty. @DawPi what is the error message? you provide the trace log, but excluded the actual error message?
  17. sorry about the delay, was away for the thanksgiving holiday. I've fixed the issue (the issue was that the demo app i created is suppose to allow you to download the latest version, but it was downloading a much older previous version). I've also reset the time on your demo key so you will get the full time for it.
  18. yeah i originally thought it was the hookData, cause when i looked at the IPS code in the section the error was referencing i thought that was the only one that it could be, cause hookData() use to do something and use to be required to call it 🙂 , so i'm not entirely sure when they changed that, cause it is almost identical to the 4.5 code and my sister has my laptop so i can't look up previous versions atm. anyway, if you are overloading a template, you need to put that container code in it, to check to see if it is callable, then use call_user_func_array to call the method instead of parent.
  19. @Adriano Faria its not 4.6 that is at fault per se, IPS is at some fault here due to the way they engineered how the theme hooks work, but it's the latest php 7.4 and 8.0 that is the issue. example: <?php class myclass { public function myfunction(){ return parent::myfunction(); } } this will error out on the new versions of 7.4 and 8.0, cause myclass isn't a child class of anything, so there is no parent to call. the theme hooks get eval'ed as stand alone classes, they replaced the " extends _HOOK_FILE" with "_tmp" (same with parent::hookData() gets replaced with array() ), so the class would be something like class my_theme_hook_temp {}. during the eval process, it it validating the code and that validation is failing on anything with parent::myfunction() that is being called in the code, that is why the call_user_func_array is working for toolbox, cause it passes the validation, so the template will build. so its not the parent::hookData() that i original thought it was, cause i just took a cursory look at the code, patched my files, it seemed to work cause my datastore wasn't cleared, but as soon as it cleared, i got that error. so in any template overrides you are doing, you need to wrap it with a if(\is_callable('parent::myfunction')){} and then inside the if statement, call the parent method with: return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); like i have done in the example hook i posted a few post up. if you need further help, send me the app, and i will make the changes so you can see within your code what i'm talking about 🙂
  20. on the hookData() method, just do: public static function hookData(){ return []; } or public static function hookData(){ return parent::hookData(); } it gets replaced by an empty array anyway before its eval'ed the solution i came up with last night is to overridden templates methods, look at the test.tar hooks folder, you will see what i mean. its a theme hook in php mode. the other thing you should do, is manually delete everything in the datastore folder, there would be times when i was testing that would be causing the issue. here is one of the them hooks i use in my toolbox apps, i have two template methods i'm overriding to be able to manipulate their parameters. //<?php /* To prevent PHP errors (extending class does not exist) revealing path */ use IPS\Output; use IPS\Request; use IPS\Theme; if (!defined('\IPS\SUITE_UNIQUE_KEY')) { exit; } class toolbox_hook_adminGlobalTemplate extends _HOOK_CLASS_ { /* !Hook Data - DO NOT REMOVE */ public static function hookData() { if (\is_callable('parent::hookData')) { return array_merge_recursive( [ 'globalTemplate' => [ 0 => [ 'selector' => '#ipsLayout_header', 'type' => 'add_inside_start', 'content' => '{{if $menu = \IPS\toolbox\Menu::i()->build()}} {$menu|raw} {{endif}}', ], 1 => [ 'selector' => 'html > body', 'type' => 'add_inside_end', 'content' => '<!--ipsQueryLog-->', ], ], ], parent::hookData() ); } return []; } /* End Hook Data */ public function globalTemplate($title, $html, $location = []) { Output::i()->cssFiles = array_merge( Output::i()->cssFiles, Theme::i()->css('devbar.css', 'toolbox', 'admin') ); if ( \is_callable('parent::globalTemplate') ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } } public function tabs( $tabNames, $activeId, $defaultContent, $url, $tabParam = 'tab', $tabClasses = '', $panelClasses = '' ) { if (Request::i()->app === 'core' && Request::i()->module === 'applications' && Request::i( )->controller === 'developer' && !Request::i()->do) { $tabNames['SchemaImports'] = 'dtdevplus_schema_imports'; } if ( \is_callable('parent::tabs') ) { return \call_user_func_array( 'parent::' . __FUNCTION__, [$tabNames, $activeId, $defaultContent, $url, $tabParam, $tabClasses, $panelClasses] ); } } }
  21. let me know, it seems to have worked for the toolbox, now i possibly gotta figure out a clever way to automate this for the future 🙂
  22. @Adriano Faria if ( \is_callable('parent::includeCSS') ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } something like this appears to work (change the if statement to the method you are overriding). i haven't tested it exhaustively, but it might be better than waiting for ips 4.12 for a fix 😛
  23. test 1.0.0.tar here is a proof of concept app for this issue, it is just one theme hook in php mode, overriding 'includeCss': //<?php /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { exit; } class test_hook_globalTemplate extends _HOOK_CLASS_ { /* !Hook Data - DO NOT REMOVE */ public static function hookData() { return parent::hookData(); } /* End Hook Data */ public function includeCSS(){ return parent::includeCSS(); } } parent::hookData() gets replaced with an empty array before you eval it, so the only thing that can be causing it is the parent call to includeCss()
  24. [Thu Jul 08 19:00:59.697206 2021] [proxy_fcgi:error] [pid 3910:tid 6158315520] [client ::1:51242] AH01071: Got error 'PHP message: PHP Fatal error: Cannot use "parent" when current class scope has no parent in /Users/michael/public_html/dev/system/Theme/Theme.php(2613) : eval()'d code on line 57', referer: http://localhost/~michael/dev/ this is the error that shows up in my apache log. i've tried several different things, even checking if parent is callable on the overloaded templates in the hook, still causes this error to pop up in php 8, not sure about 7.4, but i'd imagine it will there too as well. the line number might be a bit off for Theme.php as inserted some code to try to catch which theme hooks were erroring out.
×
×
  • Create New...