cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3.4 BUG Undefined Offset Error

Re: Magento 2.3.4 BUG Undefined Offset Error

@gaurav_harsh1  Still getting the same error,

 

app/code/Gta/Solver/Search/Dynamic/Algorithm.php

Code : https://justpaste.it/4ho58

 

Re: Magento 2.3.4 BUG Undefined Offset Error

@gaurav_harsh1 shall i do this rm -rf generated/

Re: Magento 2.3.4 BUG Undefined Offset Error

@Aveeva 

 

Yes, please !
and run setup:upgrade as well if this module is not registered yet !

 

I just tested and able to do compilation, please check it must be a typo mistake.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Magento 2.3.4 BUG Undefined Offset Error

@gaurav_harsh1  I just run all the commands, getting the following error

 

https://codeshare.io/29kvJ0

Re: Magento 2.3.4 BUG Undefined Offset Error

Hello @Aveeva 

 

Please try to disable this module and try Searchanise_SearchAutocomplete :

php bin/magento module:dsiable Searchanise_SearchAutocomplete
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

If it start working then issue with module, but the weird part it, it was working when doing it with vendor file ?

just give it a try and let us know here .

 

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Magento 2.3.4 BUG Undefined Offset Error

@gaurav_harsh1  After disabled searchanise module then run di:compile cmd, 

 

https://paste.ofcode.org/dPSgY2B7daPk2vbMMD2TTn

Re: Magento 2.3.4 BUG Undefined Offset Error

@Aveeva 

 

Then there is no dependency of any module, you are doing some type mistake as it is getting Improved keyword, it neither in Algorithm class nor in preference, please check in your code with this keyword.

 

Please share core code as well.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Magento 2.3.4 BUG Undefined Offset Error

@gaurav_harsh1  Module :

 

app/code/Gta/Solver/etc/di.xml

<?xml version="1.0"?>
 
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Framework\Search\Dynamic\Algorithm" type="Gta\Solver\Search\Dynamic\Algorithm" />
</config>

app/code/Gta/Solver/etc/module.xml

<?xml version="1.0"?>
	<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    	<module name="Gta_Solver" schema_version="0.0.1" setup_version="0.0.1"></module>
</config>

app/code/Gta/Solver/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Gta_Solver',
    __DIR__
);

app/code/Gta/Solver/Search/Dynamic/Algorithm.php

Code : https://paste.ofcode.org/eggKeUuvGeE3izxV6K9rUC

Re: Magento 2.3.4 BUG Undefined Offset Error

@gaurav_harsh1  Apart from this, anything else i need to check?

Re: Magento 2.3.4 BUG Undefined Offset Error

@Aveeva 

 

Check again by copying code to vendor (remove current preference if using vendor), is it working fine then ?

PS : add correct namespace .

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy