tuyennn / magento2-outofstockatlast

Magento 2.4.x module Sort Out Of Stock Product At last the product list
GNU General Public License v3.0
55 stars 12 forks source link

Invalid Document Element 'stockIndexerModel': This element is not expected. Line: 4 #52

Closed TomJ1588 closed 8 months ago

TomJ1588 commented 9 months ago

Preconditions (*)

Invalid Document Element 'stockIndexerModel': This element is not expected. Line: 4

  1. Magento 2.4.6-p2

Steps to reproduce (*)

  1. Composer Install Module.
  2. Setup Upgrade
  3. Visit site any page. See the error.

Expected result (*)

Working?

Actual result (*)

Error

tuyennn commented 8 months ago

@TomJ1588 thanks for the bug report, please confirm you have run the di:compile The stockIndexerModel actually was redefined here https://github.com/tuyennn/magento2-outofstockatlast/blob/master/etc/di.xml#L32-L38

Instead https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Catalog/Model/ProductTypes/Config/Reader.php#L19

TomJ1588 commented 8 months ago

Hiya @tuyennn - Yeah - ran our full deploy script (setup:upgrade, di:compile, static-content:deploy, everything) 3/4 times, Just incase it got a bad compile, same result every time.

My Fix was to comment out in the product_types.xml they whole type tag, to get it to compile with no errors, even though haven't had the time to really look in to what that does, or what that has taken out.

tuyennn commented 8 months ago

I closed this ticket due cannot reproduce from Magento 2.4.6 to 2.4.6-p3