Jump to content

Upgrade 3.4 to 4.6.9 error converting UTF8


Go to solution Solved by Stuart Silvester,

Recommended Posts

Posted

image.png.7216c2234ebf8246f113558463a4d6e4.png

immediately after this, I click begin conversion (I did this many many times and worked perfectly) but now I get this error:

Error: count(): Argument #1 ($var) must be of type Countable|array, null given File: /system/Convert/Convert.php Line: 552

on a otherwise page. Nothing else.

image.thumb.png.daf0dca121cdbc86defde09a3ec0de09.png

Posted
                                if ( $batchBytes > ( $this->_data['max_allowed_packet'] - ( ( $this->_data['max_allowed_packet'] / 100 ) * ( \count( $batch ) * 0.3 ) ) ) )
                                {
                                        /* Remove last row */
                                        $nextBatch = array_pop( $batch );

                                        static::log( "Max packet hit with " . $batchBytes . 'b with ' . \count( $batch ) . ' rows' );
                                }

                                /* If we have moved the only row from $batch to $nextbatch, then process that now */
                                if ( \count( $nextBatch ) and ! \count( $batch ) )
                                {
                                        $batch     = $nextBatch;
                                        $nextBatch = array();
                                }

 

Posted
2 minutes ago, dutchsnowden said:

Can I skip somehow UTF8 conversion and do it later? Convert manually?

No, if you skip UTF8 conversion your entire site will be unreadable.

Try changing

if ( \count( $nextBatch ) and ! \count( $batch ) )

to

if ( \is_array( $nextBatch ) and \count( $nextBatch ) and ! \count( $batch ) )

 

Posted (edited)

No difference, exact same error. (LE: I copied the above text before last edit, once I copied the last version and pasted it inthere, it worked flawlessly)

 

image.thumb.png.1a5fa7e715e10ca8ec0dbe4d930f67a2.png

Edited by dutchsnowden
Posted (edited)

image.png.4bc8c5546e35d701af8434738f07e561.png

Keep fingers crossed. AND HUGE THANK YOU!

For me it's now or never. I cannot go to sleep until I upgrade.

 

5 minutes ago, Stuart Silvester said:

Your screenshot doesn't show the same issue, did you click convert and continue the UTF8 conversion?

Changed as you instructed, hit refresh at convert and it started as normal.

image.thumb.png.c6cb869a736c508f74b66433b5506bb4.png

Not sure, I did something wrong? I definitely hope not.

 

Edited by dutchsnowden
Posted

Yes. On large conversions, that can happen. I believe it’s moved to URL refreshing instead of the in-line refreshing. 

This could happen with other large reprocessing activities like if you ever need to rebuild the search cache or rebuild all topics etc. 

You’re still in good shape!

  • Recently Browsing   0 members

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