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  yes, Working good, if i use module then only the error even backend also collapsed now everything working. Is my module right?

Re: Magento 2.3.4 BUG Undefined Offset Error

@Aveeva 

 

Create a new module and try in that.

Good luck !!! Smiley Very Happy

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

Re: Magento 2.3.4 BUG Undefined Offset Error

Re: Magento 2.3.4 BUG Undefined Offset Error

@gaurav_harsh1  What is the drawback if i paste code into vendor/magento/framework/Search/Dynamic/Algorithm.php instead o create a module?

Re: Magento 2.3.4 BUG Undefined Offset Error

@Aveeva 

 

It took me so much time to understand this while I was learning Smiley Very Happy

Reasons :

  1. We manage our project with source control (ex: git) so vendor is a huge part that we skip to send, we use composer to install them on server so if you edit that file, it will never be on your production server.
  2. These are core modules and if you change them, there will be possibility it might conflict with other feature, as all things are connected to each other.
  3. Suppose you have changed core file and you want to change it back as it need old code back, then no option of roll-back as you have changed it and can't get back as it's not added in default git setup.
  4. We update our modules or Magento via composer, so if there will be new change in that file, then the new change will override your code and again everything your customised will be lost.

even we if you install a third party module and it needs some customisation, don't work on same module, extend it so you will always have a back of "How the actual functionality works".

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

Re: Magento 2.3.4 BUG Undefined Offset Error

@gaurav_harsh1 Okay, but my module not working, i can't understand what is the error?

Re: Magento 2.3.4 BUG Undefined Offset Error

Re: Magento 2.3.4 BUG Undefined Offset Error

@gaurav_harsh1  Solved.

 

namespace Gta\Solver\Search\Dynamic;

use Magento\Framework\Search\Dynamic\IntervalInterface;

/**
 * Algorithm for layer value filter
 *
 * @author      Magento Core Team <core@magentocommerce.com>
 * @api
 */
class Algorithm extends \Magento\Framework\Search\Dynamic\Algorithm

Re: Magento 2.3.4 BUG Undefined Offset Error

@Aveeva 

 

That's good if issue resolved but not a valid approach, because what you are doing by extending core class is, you're linking the core as parent, but we had to replace that class.

well that's good if issue resolved and also check other changes as well in that commit that they are not linked with this class.

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

Re: Magento 2.3.4 BUG Undefined Offset Error

@gaurav_harsh1  I have maintained two websites, for another website Algorithm.php not available in vendor path instead of available in lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php, here how to can i assign my namespace?