Jump to content

CodingJungle

Clients
  • Posts

    3,066
  • Joined

  • Days Won

    31

Reputation Activity

  1. Like
    CodingJungle got a reaction from DawPi in Weird bug with widget on PHP 8   
    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)
  2. Like
    CodingJungle got a reaction from DawPi in Weird bug with widget on PHP 8   
    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. 
  3. Like
    CodingJungle got a reaction from DawPi in Weird bug with widget on PHP 8   
    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).
  4. Like
    CodingJungle got a reaction from PolyMarvels in [CJ] Babble (Support Topic)   
    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. 
  5. Like
    CodingJungle got a reaction from PolyMarvels in [CJ] Babble (Support Topic)   
    https://codingjungle.com/babble/?app=babbleadmin&module=license&controller=demo
    you can sign up here for a demo 🙂 
  6. Thanks
    CodingJungle got a reaction from HelloWorld in Theme Hook weirdness in 4.6   
    Okay after a bit more digging into the code, i see why this can happen.
    it is any theme hook, that has an override for a template in it or aka "theme hook in php mode"
    try{ if ( eval( "namespace IPS\\Theme;\n\n" . str_replace( array( ' extends _HOOK_CLASS_', 'parent::hookData()' ), array( '_tmp', 'array()' ), file_get_contents( $path . '/' . $data['file'] ) ) ) !== FALSE ) { $class = "IPS\\Theme\\" . $data['class'] . "_tmp"; $templateHooks = array_merge_recursive( $templateHooks, $class::hookData() ); } } catch ( \ParseError $e ) { } in php 8.0 it is now a fatal error to call a non existing parent class/method, in the latest php 7.4 it is a deprecated.
    so since at this point, the hook in php mode isn't actually extending another class, it is blowing up. this is def an engineering issue on IPS side of things. so technically any theme hook in php mode, that eval and try to call a parent method that doesn't exist, will throw this fatal/warning in the current versions of php. we don't see it while IN_DEV cause templates are compiled differently there. 
    i wonder now if it happens with class hooks, that get wrapped up by IPS try/catch block they place inside every method, even if the method doesn't exist in the parent.  
     
  7. Like
    CodingJungle got a reaction from DSystem in Theme Hook weirdness in 4.6   
    @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 🙂
  8. Thanks
    CodingJungle got a reaction from InvisionHQ in Theme Hook weirdness in 4.6   
    Okay after a bit more digging into the code, i see why this can happen.
    it is any theme hook, that has an override for a template in it or aka "theme hook in php mode"
    try{ if ( eval( "namespace IPS\\Theme;\n\n" . str_replace( array( ' extends _HOOK_CLASS_', 'parent::hookData()' ), array( '_tmp', 'array()' ), file_get_contents( $path . '/' . $data['file'] ) ) ) !== FALSE ) { $class = "IPS\\Theme\\" . $data['class'] . "_tmp"; $templateHooks = array_merge_recursive( $templateHooks, $class::hookData() ); } } catch ( \ParseError $e ) { } in php 8.0 it is now a fatal error to call a non existing parent class/method, in the latest php 7.4 it is a deprecated.
    so since at this point, the hook in php mode isn't actually extending another class, it is blowing up. this is def an engineering issue on IPS side of things. so technically any theme hook in php mode, that eval and try to call a parent method that doesn't exist, will throw this fatal/warning in the current versions of php. we don't see it while IN_DEV cause templates are compiled differently there. 
    i wonder now if it happens with class hooks, that get wrapped up by IPS try/catch block they place inside every method, even if the method doesn't exist in the parent.  
     
  9. Like
    CodingJungle got a reaction from IPCommerceFan in Developer Center Bugs: Default Inserts   
    just fyi, i got annoyed with the interface issues, and on my toolbox app, one of the tabs that is added is "table imports", this allows you to insert the data thru like phpmyadmin/adminer and then import it into your application. 
  10. Thanks
    CodingJungle got a reaction from A Zayed in Theme Hook weirdness in 4.6   
    @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 🙂
  11. Like
    CodingJungle got a reaction from SeNioR- in Theme Hook weirdness in 4.6   
    @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 😛 
  12. Thanks
    CodingJungle got a reaction from CoffeeCake in Theme Hook weirdness in 4.6   
    Okay after a bit more digging into the code, i see why this can happen.
    it is any theme hook, that has an override for a template in it or aka "theme hook in php mode"
    try{ if ( eval( "namespace IPS\\Theme;\n\n" . str_replace( array( ' extends _HOOK_CLASS_', 'parent::hookData()' ), array( '_tmp', 'array()' ), file_get_contents( $path . '/' . $data['file'] ) ) ) !== FALSE ) { $class = "IPS\\Theme\\" . $data['class'] . "_tmp"; $templateHooks = array_merge_recursive( $templateHooks, $class::hookData() ); } } catch ( \ParseError $e ) { } in php 8.0 it is now a fatal error to call a non existing parent class/method, in the latest php 7.4 it is a deprecated.
    so since at this point, the hook in php mode isn't actually extending another class, it is blowing up. this is def an engineering issue on IPS side of things. so technically any theme hook in php mode, that eval and try to call a parent method that doesn't exist, will throw this fatal/warning in the current versions of php. we don't see it while IN_DEV cause templates are compiled differently there. 
    i wonder now if it happens with class hooks, that get wrapped up by IPS try/catch block they place inside every method, even if the method doesn't exist in the parent.  
     
  13. Like
    CodingJungle reacted to Adriano Faria in Theme Hook weirdness in 4.6   
    Oh, I see... is_callable should be used in the template I'm extending; I was using in the hookData.
    Tks, @CodingJungle!
  14. Like
    CodingJungle got a reaction from InvisionHQ in Theme Hook weirdness in 4.6   
    @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 🙂
  15. Like
    CodingJungle got a reaction from Adriano Faria in Theme Hook weirdness in 4.6   
    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 🙂 
  16. Like
    CodingJungle got a reaction from Edjazoli in Theme Hook weirdness in 4.6   
    @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 😛 
  17. Like
    CodingJungle got a reaction from Adriano Faria in Theme Hook weirdness in 4.6   
    Okay after a bit more digging into the code, i see why this can happen.
    it is any theme hook, that has an override for a template in it or aka "theme hook in php mode"
    try{ if ( eval( "namespace IPS\\Theme;\n\n" . str_replace( array( ' extends _HOOK_CLASS_', 'parent::hookData()' ), array( '_tmp', 'array()' ), file_get_contents( $path . '/' . $data['file'] ) ) ) !== FALSE ) { $class = "IPS\\Theme\\" . $data['class'] . "_tmp"; $templateHooks = array_merge_recursive( $templateHooks, $class::hookData() ); } } catch ( \ParseError $e ) { } in php 8.0 it is now a fatal error to call a non existing parent class/method, in the latest php 7.4 it is a deprecated.
    so since at this point, the hook in php mode isn't actually extending another class, it is blowing up. this is def an engineering issue on IPS side of things. so technically any theme hook in php mode, that eval and try to call a parent method that doesn't exist, will throw this fatal/warning in the current versions of php. we don't see it while IN_DEV cause templates are compiled differently there. 
    i wonder now if it happens with class hooks, that get wrapped up by IPS try/catch block they place inside every method, even if the method doesn't exist in the parent.  
     
  18. Thanks
    CodingJungle got a reaction from Schaken in [CJ] Downloads Plus (Support Topic)   
    i submitted an update for it a few days ago to the market, so i don't know how long it will be till it is approved. 
  19. Thanks
    CodingJungle got a reaction from Steph40 in [CJ] Downloads Plus (Support Topic)   
    i submitted an update for it a few days ago to the market, so i don't know how long it will be till it is approved. 
  20. Like
    CodingJungle got a reaction from Chris Anderson in [CJ] Stratagem (Support Topic)   
    i've released 2.4.0 of stratagem to the marketplace and my website (the marketplace one might take a little bit to be approved, i heard they have quite a backlog).
    here is the changelog for 2.4.0, a few new features and several fixes.
    fixed issue with project filters (they now work again :)), also fixed it showing cards that meet 1 or 2 of the criteria for filters instead of all of them. fixed issue for notifications, when a user is removed from a private project, they should now no longer be able to receive new notifications. fixed issue with "limit card view", due to a permission misconfiguration, wouldn't show all cards with a team member who had the permission to "card sort" or "card assign"  fixed/change how calendar integration works. now we use a more custom solution, instead of directly using the calendar app. (still requires the calendar app to be installed, as this new method uses the css/js from calendar). this solution should prevent duplication of strategem calendars and duplicate stratagem events on that calendar, the calendar is now generated at access time, and the card events are generated then and there as well. NOTE: you can safely delete any stratagem calendars that were created by previous versions, as they will no longer be used. Copying: added in copying of project/column/cards. you will enable in project settings if you want copying to be enabled, and then assign the permissions to the teams as you see fit. Note: if a project is has limit card view enabled, then team members will only be able to copy the cards they can see (this also applies if they copy the project, it will only copy the cards they can see). This also applies to columns that have restrictions, if they aren't on the allow list (een if they can see the column and its cards), they will not have the copy option nor will they be copied if the project is copied. Note2: copying cards is a instant action, but copying a column or project runs thru a task, so there might be a delay between copying the column/project, before it shows up or is completed. Note3: A lot of the settings for a project will be copied, but things like "real time mode", "due date", "publish date", "slack hooks", "git repos", and a few others, will not carry over to a copied project, nor will teams. all copied cards from a project, will have their creation date and author updated to the time it was copied and the user who copied the project.  Several new history entries, mostly related to copying cards/columns/projects.  fixed issue with quick access, it should now update properly for any changes to columns. fixed "lock project" and limit card view settings, before if you locked a project with limit card view enabled, it would show the restricted cards to anyone who viewed the project, now it will function as it would before locking the project. 
  21. Like
    CodingJungle got a reaction from Joey_M in [CJ] Stratagem (Support Topic)   
    i'm working on a 4.6 update. 
    one of the bigger aspects of this update i'm working on, will be is a custom calendar section, as trying to integrate into the calendar has had varying amounts of success and issues, so i've decided to add a calendar section to stratagem, it will still require calendar as it uses its JS and css, but it doesn't actually use the calendar app itself. this should allow for more things i can do with it eventually 🙂 
  22. Like
    CodingJungle got a reaction from WP V0RT3X in Developer Center Bugs: Default Inserts   
    just fyi, i got annoyed with the interface issues, and on my toolbox app, one of the tabs that is added is "table imports", this allows you to insert the data thru like phpmyadmin/adminer and then import it into your application. 
  23. Like
    CodingJungle got a reaction from Sonya* in Developer Center Bugs: Default Inserts   
    just fyi, i got annoyed with the interface issues, and on my toolbox app, one of the tabs that is added is "table imports", this allows you to insert the data thru like phpmyadmin/adminer and then import it into your application. 
  24. Thanks
    CodingJungle got a reaction from media in [CJ] Name 2 Avatars (Support Topic)   
    sorry for the delay, my minion seems to have skipped out on me. 
    I've been in the hospital for the last month and just got released last week.
    I installed the app to 4.6 and it seems to be working with 4.6 without any issue, i'll double check and do a version bump as a maintenance release. 
  25. Thanks
    CodingJungle got a reaction from Steph40 in [CJ] Name 2 Avatars (Support Topic)   
    sorry for the delay, my minion seems to have skipped out on me. 
    I've been in the hospital for the last month and just got released last week.
    I installed the app to 4.6 and it seems to be working with 4.6 without any issue, i'll double check and do a version bump as a maintenance release. 
×
×
  • Create New...