Jump to content

Balto

Members
  • Posts

    130
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by Balto

  1. On 5/23/2022 at 5:51 PM, OptimusBain said:

    Hello,

    I just had my webaster to enable PHP 8 for the community. We got an error 500 after that. 

    We enabled 8.0 for WordPress and another domain in the same server and all went smoothly. It didn't work on Invision Community. We've reversed the installation to the previous php version and works fine again. 

    I need help on this. 

    Thanks

    Same problem from my side, I had to get back to PHP 7.4. Have you solved this? And if so, how?

    Thanks!

  2. Hello,

     

    I have the block "Clubs" in the home page of my website. I have found an issue (bug?) with that. These are the settings I have:

    Could contain: Text, Page, Number, Symbol

     

    And this is what I see:

     

    Could contain: Text, Page, File

     

    Everything correct here, but 9 minutes ago I have added a reply in the club "TEST 1", and the club "TEST 2" is still listed first. Clubs are sorted by latest activity, so TEST 1 should be ranked first. This will happen (according to my previous experience) in 30-40 minutes from the latest reply. I guess in a few minutes TEST 1 would finally get to the first position and TEST 2 to the second position, but it will be more than 30 minutes after the reply to a thread in that club. I would need this to happen in real time or maximum 1 minute after the latest reply. Is there any way I can do that?

     

    Also, a suggestion: it would be nice if the "Sort by" options in the Clubs bloc would be the same of the Topic Feed block:

     

    Could contain: Text, Page

     

    "Recently Updated" here means the latest reply. "Latest activity" in the club means, I guess, latest reply (99% of the times), or a user who joined the club (1% of the times). Maybe something else is considered as "activity"? Maybe a reaction? Anyway, it would be great to have the option to sort clubs just like the "sort by: Recently Updated" works for the Topic Feed block.

     

    Thank you!

  3. 22 hours ago, Daniel F said:

    The block with ID 165 seems to be the evil one.

    Based on the error message which mentions usort, I'm betting my money on some weird usort usage, PHP8 got here much more strict, pls see https://wiki.php.net/rfc/stable_sorting

    Hello @Daniel F, I have copied in the post above the code for that block. I have no clue how what to edit there and I would not want to damage the code. Maybe it is just a matter of changing something in the code and the problem would be fixed?

    Thank you!

  4. 7 minutes ago, Daniel F said:

    The block with ID 165 seems to be the evil one.

    Based on the error message which mentions usort, I'm betting my money on some weird usort usage, PHP8 got here much more strict, pls see https://wiki.php.net/rfc/stable_sorting

    You are right, that is the "evil" one. This is a custom block made by one of the IPS users. By the way now he is in holidays 😄 Here is the content, can you please tell me if something needs to be changed to fix this?

    Thanks!

     

    Quote

    {{$categoryId = 585;}}


    {{$cats = iterator_to_array( \IPS\Db::i()->select('*', 'cms_database_categories', array('category_parent_id=?', $categoryId ) ) );}}

    {{foreach $cats as $idx => $cat}}

        {{try{}}
            {{$cats[ $idx ]['quota'] = \IPS\Db::i()->select( 'field_36','cms_custom_database_9', array('category_id=? AND record_approved=1', $cat['category_id'] ) )->first();}}
        {{} catch( \Exception $ex ){}}
            {{$cats[ $idx ]['quota'] = 0;}}
        {{ } }}

    {{endforeach}}

    {{usort( $cats, function ($a, $b ){ return ($b['quota'] - $a['quota']); } );}}
      <h3 style="font-family:Quicksand,sans-serif; font-size: 26px; padding-left: 30px" class='ipsWidget_title ipsType_reset'>Summer Olympic Games Paris 2024 Qualified Athletes by Nation</h3>

    <div class='ipsCarousel ipsClearfix quoteBlock' data-ipsCarousel data-ipsCarousel-slideshow>
                    <div class='ipsCarousel_inner'>
                        <div class='cDownloadsCarousel ipsClearfix ipsGrid' data-role="carouselItems" data-ipsgrid data-ipsgrid-equalheights="row">
                            {{foreach $cats as $catArray}}
                            {{$cat = \IPS\cms\Categories9::load( $catArray['category_id'] );}}
                            <div class='ipsCarousel_item' data-ipsLazyLoad>
                                <div class="SG_category_item ipsAreaBackground_reset ipsBox ipsGrid_span2">
                                    <center>                
                                      {{if $cat->pcimage}}
                                      <a href="{{if $cat->pcl_url}}{$cat->pcl_url}{{else}}{$cat->url()}{{endif}}">
                                      <div class="SG_cat_image" style="background-image:url('{file='$cat->pcimage'}');"></div>
                                      </a>
                                      {{endif}}

                                        <div class="ipsDataItem_main ipsPos_middle">
                                          <h4 class="ipsDataItem_title ipsType_large catLarge">
                                            <a href="{{if $cat->pcl_url}}{$cat->pcl_url}{{else}}{$cat->url()}{{endif}}">{$cat->_title}</a>
                                          </h4>
                                          
                                       </div>

                                       {{if isset( $catArray['quota'] )}}
                                              <div class='ipsMargin_top:half ipsType_reset ipsType_light ipsType_large'>
                                                  <strong>Total Athletes:</strong> {$catArray['quota']}
                                              </div>
                                          {{endif}}
                                    </center>
                                </div>
                            </div>
                            {{endforeach}}
                        </div>
                    </div>
                    <span class='ipsCarousel_shadow ipsCarousel_shadowLeft'></span>
                    <span class='ipsCarousel_shadow ipsCarousel_shadowRight'></span>
                    <a href='#' class='ipsCarousel_nav ipsHide' data-action='prev'><i class='fa fa-chevron-left'></i></a>
                    <a href='#' class='ipsCarousel_nav ipsHide' data-action='next'><i class='fa fa-chevron-right'></i></a>
                </div>

     

     

  5. 6 minutes ago, Marc Stridgen said:

    This is because there is PHP code which is not comparible with PHP 8. With the one above, have you checked that test page? It looks like you have a custom block on there which is causing you issues

    I can not even check right now, because I can not open the page at all and I don't rememember exactly which blocks I was using there. So I should get back to PHP 7.4 to access the page.

     

    But even when I will be able to see which blocks I have there, how can I find out which is the block causing the problem?


    Thanks!

  6. 4 minutes ago, Daniel F said:

    1. Check your PHP error log.
    2. Take a look at the blocks in the ACP to see if any contains any customized templates. If yes, review them and make sure that the used code works with PHP 8 / PHP 8.1

    In the "Systems Log" I get thousands of this:

     

    Could contain: Text, Page

     

    And if I open one I get this:

     

    Could contain: Text, Page, Document, Word, Flyer, Brochure, Poster, Advertisement, Paper

     

    5 minutes ago, Daniel F said:

    any customized templates.

    Well yes, I have cusotmized templates. But how can I find out what is not working? And why PHP 8.0 give all these problems?

  7. 13 hours ago, Jim M said:

    There is not here, as the stack trace is rather generalized. Unless you are aware of if there are any which hooks into this:

    marktopic_hook_code_forums_modules_front_topic

    Update: Actually yesterday the problem was fixed by itself 30-45 minutes after the downgrade to PHP 7.4. The problem was still happening after the downgrade, but then some minutes later it was fixed by itself. I didn't do anything and my hosting service also didn't do anything. Is that possible? And is it possible that would happen also if I keep PHP 8.0?

  8. 1 hour ago, Edjazoli said:

    I have checked your error from opening topic and you have explanation there, 

    Core/front/global/userphoto…. Go to files and compare with default theme 

    Hello! Thank you for your reply!

     

    I have been there and I have seen the CSS is unmodified:

     

    Quote

    {{if $member->member_id and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members' ) )}}
    {{$memberURL = ( $warningRef ) ? $member->url()->setQueryString( 'wr', $warningRef ) : $member->url();}}
        <a href="{$memberURL}" rel="nofollow" {{if $hovercard}}data-ipsHover data-ipsHover-width="370" data-ipsHover-target="{$memberURL->setQueryString( 'do', 'hovercard' )}"{{endif}} class="ipsUserPhoto ipsUserPhoto_{$size}{{if $classes}} {$classes}{{endif}}" title="{lang="view_user_profile" sprintf="$member->name"}">
            <img src='{$member->photo}' alt='{$member->name}' loading="lazy">
        </a>
    {{else}}
        <span class='ipsUserPhoto ipsUserPhoto_{$size} {{if $classes}}{$classes}{{endif}}'>
            <img src='{$member->photo}' alt='{$member->name}' loading="lazy">
        </span>
    {{endif}}

     

    1 hour ago, Edjazoli said:

    You can change back to 7.xxx and get the access back-simplest way 

    Yes, but I have to understand what cause the problem, otherwise it will surely happen again in the future when PHP 7.4 will not be supported anymore!

  9. 4 minutes ago, Jim M said:

    As Daniel mentioned, there is a custom theme or third party application/plugin which is causing this issue. You would need to find out which one it is and then disable it and contact the author. 

    But isn't there any way to find out which custom theme or third party application/plugin is causing the issue? Disabling them one by one can be very time consuming, considering when I update the 8.0 I can not even access the adminCP. Thanks!

  10. 8 minutes ago, Jim M said:

    Alternatively, you will want to go back to PHP 7.4

    The problem is now fixed with PHP 7.4

     

    But I want to use PHP 8.0 going on.

     

    Here is the system log of the error I got:

     

    Quote

    Error: Undefined constant "IPS\Theme\large" in /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(885) : eval()'d code:18294
    Stack trace:
    #0 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->userPhoto()
    #1 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(885) : eval()'d code(2619): IPS\Theme\_SandboxedTemplate->__call()
    #2 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_forums_front_topics->postContainer()
    #3 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(885) : eval()'d code(5941): IPS\Theme\_SandboxedTemplate->__call()
    #4 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_forums_front_topics->topic()
    #5 /var/www/vhosts/totallympics.com/httpdocs/applications/forums/modules/front/forums/topic.php(573): IPS\Theme\_SandboxedTemplate->__call()
    #6 /var/www/vhosts/totallympics.com/httpdocs/init.php(927) : eval()'d code(31): IPS\forums\modules\front\forums\_topic->manage()
    #7 /var/www/vhosts/totallympics.com/httpdocs/system/Dispatcher/Controller.php(118): IPS\forums\modules\front\forums\marktopic_hook_code_forums_modules_front_topic->manage()
    #8 /var/www/vhosts/totallympics.com/httpdocs/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute()
    #9 /var/www/vhosts/totallympics.com/httpdocs/applications/forums/modules/front/forums/topic.php(39): IPS\Content\_Controller->execute()
    #10 /var/www/vhosts/totallympics.com/httpdocs/system/Dispatcher/Dispatcher.php(153): IPS\forums\modules\front\forums\_topic->execute()
    #11 /var/www/vhosts/totallympics.com/httpdocs/index.php(13): IPS\_Dispatcher->run()
    #12 {main}

     

    Backtrace:

     

    Quote

    #0 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(71): IPS\_Log::log()
    #1 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(885) : eval()'d code(2619): IPS\Theme\_SandboxedTemplate->__call()
    #2 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_forums_front_topics->postContainer()
    #3 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(885) : eval()'d code(5941): IPS\Theme\_SandboxedTemplate->__call()
    #4 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_forums_front_topics->topic()
    #5 /var/www/vhosts/totallympics.com/httpdocs/applications/forums/modules/front/forums/topic.php(573): IPS\Theme\_SandboxedTemplate->__call()
    #6 /var/www/vhosts/totallympics.com/httpdocs/init.php(927) : eval()'d code(31): IPS\forums\modules\front\forums\_topic->manage()
    #7 /var/www/vhosts/totallympics.com/httpdocs/system/Dispatcher/Controller.php(118): IPS\forums\modules\front\forums\marktopic_hook_code_forums_modules_front_topic->manage()
    #8 /var/www/vhosts/totallympics.com/httpdocs/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute()
    #9 /var/www/vhosts/totallympics.com/httpdocs/applications/forums/modules/front/forums/topic.php(39): IPS\Content\_Controller->execute()
    #10 /var/www/vhosts/totallympics.com/httpdocs/system/Dispatcher/Dispatcher.php(153): IPS\forums\modules\front\forums\_topic->execute()
    #11 /var/www/vhosts/totallympics.com/httpdocs/index.php(13): IPS\_Dispatcher->run()
    #12 {main}

    Any idea what could cause the problem?

    Thanks!
     

  11. So to make a summary:

    -This morning I had IPS 4.6.12.1 and PHP 7.4, everything was working fine.

    -I have enabled PHP 8.0, and the theme problem happened

    -I have enabled PHP 7.4 again, went in AdminCP, cleared the cache, and everything was working fine

    -One hour ago I have updated to IPS 4.7.1, everything was working fine

    -I have tried to enable PHP 8.0, and the theme problem happened

    -I have enabled PHP 7.4 again, but now I can not go to AdminCP so I can not clear the cache and solve the problem

     

    Any idea how can I enter the AdminCP now?

    Thanks!

  12. If I just could enter my AdminCP, I would clear the cache and the problem would be fixed (since I am now running again PHP 7.4). It happened the same when I tried to do so with IPS 4.6.12. But right now I can't enter the AdminCP so I can not clear the cache!

    Just now, Daniel F said:

    That’s a problem with a 3rd party application or plugin with a theme hook. Try disabling one by one too see which causes this.

    I currently can not even open the AdminCP!

  13. Hello,

     

    I have recently updated my version to IPS 4.7.1, and then asked my provider to update the PHP version to 8.0 (from 7.4).

     

    Just like it happened when I tried to update to PHP 8.0 before (but I thought it was I still had IPS 4.6 version), here is the problem I face:

     

    Could contain: Text, Word, Face, Alphabet

     

    Also, I can not access my AdminCP. When I click on mywebsite/admin, sometimes I get a blank page, sometimes I get this error message:

     

    Could contain: Text, Page, Word

     

    Any idea why this happens?

     

    The provider sent me the error message (related to my theme):

    PHP Fatal error: Cannot use "parent" when current class scope has no parent in /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(2703) : eval()'d code on line 39



    Thanks!

  14. 2 minutes ago, Marc Stridgen said:

    The only way to do so would be to switch to it then run the requirement checker. You can of course ensure your server is running the minimum requirements for PHP 8 before switching it, and check with the authors of any 3rd party items before doing so

    Hello,

     

    is it normal if I upgrade to PHP 8.0 before with the IPS 4.6.12.1 version, everything gets messy? Like my whole theme got broken and I had to put PHP 7.4 version again.

     

    When I will update to IPS 4.7.1, I can switch to PHP 8.0 and that will not happen?

    Thanks!

  15. 6 minutes ago, Randy Calvert said:

    Code would be difficult because you can’t control formatting. Things like spaces, tabs, etc all make parsing code almost impossible to do accurately. <b> This is a test </b> is different than <b>This is a test</b>

    Yeah, but I would need only the text start with <b> This to be automatically changed into <b>This

    This is not possible to realize?

×
×
  • Create New...