Maximilian Atlantis Posted December 17, 2022 Posted December 17, 2022 Fatal error: Cannot use "parent" when current class scope has no parent in /homepages/42/d205474031/htdocs/(site name)/forum/system/Theme/Theme.php(2703) : eval()'d code on line 37
Maximilian Atlantis Posted December 17, 2022 Author Posted December 17, 2022 I've update it manually - it doesn't work https://avvadon.org/forum/ Fatal error: Cannot use "parent" when current class scope has no parent in /homepages/42/d205474031/htdocs/avvadon/forum/system/Theme/Theme.php(2703) : eval()'d code on line 37
Daniel F Posted December 17, 2022 Posted December 17, 2022 That’s an issue with a 3rd party app! Disable all your 3rd party apps and plugins to resolve the issue. Then make sure that you have the recent version installed Maximilian Atlantis 1
Maximilian Atlantis Posted December 17, 2022 Author Posted December 17, 2022 (edited) I've renamed plugins folder and renamed it back - and it's working now! Edited December 17, 2022 by Maximilian Atlantis
teraßyte Posted December 17, 2022 Posted December 17, 2022 Also, PHP 8.2 is not supported yet. You should go back to 8.1.
Maximilian Atlantis Posted December 17, 2022 Author Posted December 17, 2022 Everything is working, thank you!
Jim M Posted December 17, 2022 Posted December 17, 2022 Glad to hear your issue is resolved. Maximilian Atlantis 1
IBResource ltd. Posted February 14, 2023 Posted February 14, 2023 On 12/17/2022 at 5:07 AM, Maximilian Atlantis said: I've renamed plugins folder and renamed it back - and it's working now! By doing that you have excluded theme plugins from templates compilation. This is temporary solution until next recompilation. There is an issue with PHP8 uncatchable error, which was deprecated in PHP7.4. Some theme plugin hooks use trick with parent template function overloading in addition to documented hookData() method: public function includeCSS() { \IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'somePlugin.css', 'core', 'front' ) ); return parent::includeCSS(); } As a workaround you can fool the interpreter by changing return parent::includeCSS(); to return \call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() ); The difficulty is that these new errors are not catchable by error handler, so you can't know which hook file is causing them. This often happens with this plugin https://invisioncommunity.com/files/file/9966-back-2-top/ and this app https://invisioncommunity.com/files/file/7940-iawards/ balazsp and SeNioR- 1 1
Adriano Faria Posted February 14, 2023 Posted February 14, 2023 1 hour ago, IBResource ltd. said: By doing that you have excluded theme plugins from templates compilation. This is temporary solution until next recompilation. There is an issue with PHP8 uncatchable error, which was deprecated in PHP7.4. Some theme plugin hooks use trick with parent template function overloading in addition to documented hookData() method: public function includeCSS() { \IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'somePlugin.css', 'core', 'front' ) ); return parent::includeCSS(); } As a workaround you can fool the interpreter by changing return parent::includeCSS(); to return \call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() ); The difficulty is that these new errors are not catchable by error handler, so you can't know which hook file is causing them. This often happens with this plugin https://invisioncommunity.com/files/file/9966-back-2-top/ and this app https://invisioncommunity.com/files/file/7940-iawards/ SeNioR- 1
CodingJungle Posted February 15, 2023 Posted February 15, 2023 On 12/16/2022 at 8:03 PM, Daniel F said: That’s an issue with a 3rd party app! Disable all your 3rd party apps and plugins to resolve the issue. Then make sure that you have the recent version installed sorry Daniel, but this is NOT a third party issue. This is an engineering problem inside the framework. This was an issue reported/showed up almost 2 years ago and u guys did nothing to fix it or even comment on it, it was left up to me to debug it and come out with a solution. This is a good example of us using features of php (and of IPS) and since the framework is still mostly a pho 5.3 framework, it not playing nice with the modern versions. This is honestly the kind of nonsense of why I left. 2 hours ago, IBResource ltd. said: By doing that you have excluded theme plugins from templates compilation. This is temporary solution until next recompilation. There is an issue with PHP8 uncatchable error, which was deprecated in PHP7.4. Some theme plugin hooks use trick with parent template function overloading in addition to documented hookData() method: public function includeCSS() { \IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'somePlugin.css', 'core', 'front' ) ); return parent::includeCSS(); } As a workaround you can fool the interpreter by changing return parent::includeCSS(); to return \call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() ); The difficulty is that these new errors are not catchable by error handler, so you can't know which hook file is causing them. This often happens with this plugin https://invisioncommunity.com/files/file/9966-back-2-top/ and this app https://invisioncommunity.com/files/file/7940-iawards/ These are not third party developer issues, don’t let IPS TELL U THEY ARE. these are issues caused by an engineering problem with in the framework as demonstrated by the topic Adriano linked too. They are eval’ing a non extended class to check for errors or something like that and that is where it throws the deprecate notice in 7.4 and the fatal in 8.0+. Put IPS’s feet to the fire, demand better from a software company that charges $300 a year for renewals for mediocre improvements and many years of outstanding bugs they ignore or refuse to fix. SeNioR-, TDBF, IBResource ltd. and 4 others 7
Stuart Silvester Posted February 16, 2023 Posted February 16, 2023 On 2/15/2023 at 1:19 AM, CodingJungle said: sorry Daniel, but this is NOT a third party issue. This is an engineering problem inside the framework. This was an issue reported/showed up almost 2 years ago and u guys did nothing to fix it or even comment on it, it was left up to me to debug it and come out with a solution. Thank you for bringing this issue to our attention, CodingJungle. We understand your frustration and apologize for any inconvenience this may have caused you. However, it's important to note that when customers manually write custom code to interact with our framework, it's their responsibility to ensure that it's compatible. While we do our best to provide support and address issues as they arise, we cannot guarantee that every possible combination of custom code will work seamlessly with our framework. We appreciate the solution you came up with and shared with us. Moving forward, we will do our best to improve the framework and ensure that our customers have a smoother experience. I did look further today to see if there's something we could implement to at least stop this causing a fatal error. I've committed an idea and put it to the rest of the development team for review. I can't guarantee we'll proceed with it after review and testing, but it looks hopeful. Afrodude, DSystem, Adriano Faria and 1 other 4
CodingJungle Posted February 17, 2023 Posted February 17, 2023 1 hour ago, Stuart Silvester said: However, it's important to note that when customers manually write custom code to interact with our framework, it's their responsibility to ensure that it's compatible. While we do our best to provide support and address issues as they arise, we cannot guarantee that every possible combination of custom code will work seamlessly with our framework. this is one i would disagree on. the documentation states this: Quote Under the hood, each template group is compiled into a PHP class, with a method for each template. You can extend this class by manually editing the file which will have been created in /plugins/<your plugin>/hooks. It is important to note that when using this mode, you are overloading the compiled template group so the return value will be the HTML that will be displayed, without any template logic or template tags. so this tells me that my hook is being extended by the compiled theme class, which looks like this: any developer worth their weight in salt, would come to the same conclusion that calling a parent in an overloaded method, should not be a problem. its a basic feature of OOP in php. so i would still argue that the problem is an engineering one inside the framework. this is why i get extremely frustrated with IPS. its a substantial investment on my part to be apart of the third party community (renewal fees + time), then to be told that a lot of the support issues IPS faces if from third party and frankly a lot of that is on IPS hands. you give us almost no tools, no real sdk (like example or boilerplate code), IDE plugins, cli generators, etc, that a lot of free frameworks will have available. like most of the "incompatibilities" created by third party i've ever run into in IPS could be eradicated with with included developer tools like a proxy class generator or a way for hooks to be understood by IDE's. sure i understand IPS isn't a multibillion company and doesn't have the resources to develop like a IDE plugin for its framework, but most of the other things i mentioned, i was able to create without any of that and i'm just one guy with a linux PC and a deskcat. any way, i'm not even suppose to be here today! SeNioR-, TDBF, DSystem and 2 others 5
Afrodude Posted February 17, 2023 Posted February 17, 2023 On 2/14/2023 at 7:19 PM, CodingJungle said: This was an issue reported/showed up almost 2 years ago and u guys did nothing to fix it or even comment on it I pointed this out just recently mate. On 2/4/2023 at 4:51 PM, Afrodude said: We already did that, and the only information we receive from IPS staff is that the reports are still open. Furthermore, several issues that went unnoticed were reported by great third-party developers along with the fix in order to make it easier for the IPS developers' team. Developer Connection - Invision Community As of today, I have been with IPS for 18 years. I am really proud of the entire team and all that they have accomplished, and I will always support IPS. It is unfair that anytime someone offers assistance, his efforts and suggested solutions are ignored since there have recently been so many issues that they may sometimes be overwhelming especially whenever we see that you do have a deadline to release cloud new features, and yet several bugs report that been opened. A bug report that has been open for more than three months and is still unresolved, in my opinion, is unreasonable. CodingJungle, DSystem and TDBF 3
ZakRhyno Posted June 4, 2023 Posted June 4, 2023 On 2/16/2023 at 4:09 PM, Stuart Silvester said: Thank you for bringing this issue to our attention, CodingJungle. We understand your frustration and apologize for any inconvenience this may have caused you. However, it's important to note that when customers manually write custom code to interact with our framework, it's their responsibility to ensure that it's compatible. While we do our best to provide support and address issues as they arise, we cannot guarantee that every possible combination of custom code will work seamlessly with our framework. We appreciate the solution you came up with and shared with us. Moving forward, we will do our best to improve the framework and ensure that our customers have a smoother experience. I did look further today to see if there's something we could implement to at least stop this causing a fatal error. I've committed an idea and put it to the rest of the development team for review. I can't guarantee we'll proceed with it after review and testing, but it looks hopeful. What is the status of the progress of this @Stuart Silvester ?
Stuart Silvester Posted June 4, 2023 Posted June 4, 2023 This change was shipped in 4.7.8 - SeNioR- 1
Recommended Posts