ProductUrlRewriteGenerator Issue

Hi Mall,
I am getting Error 503 back end fetch failed Guru meditation varnish error from few days, I am trying to recompile the code. When i enter php -f bin/magento setup:di:compile code it gives error as 
[Exception]
Warning: Declaration of Ubertheme\Ubdatamigration\Model\ProductUrlRewriteGenerator::generateForGlobalScope($productCategories) should be compatible with Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator::generateForGlobalScope($productCategories, $product = NULL, $rootCategoryId = NULL) in /opt/bitnami/apps/magento/htdocs/app/code/Ubertheme/Ubdatamigration/Model/ProductUrlRewriteGenerator.php on line 0
I have already replaced previous di.xml file you shared. Please advise.
Many Thanks,
Sam
 

4 answers

Profile photo of Mall Staff 184060.00 $tone September 5, 2017
Public

Hi there,

I have already replaced previous di.xml file you shared. Please advise.

To solve that issue, let’s download the file XML at HERE
and upload replace downloaded file to the file at path: app/code/Ubertheme/Ubdatamigration/etc/di.xml
Once done, clean the Magento cache. And tell me know how it goes.
Regards,
Mall.

#1
Profile photo of ssleftfield 190.00 $tone September 6, 2017
Public

Hi Mall,
 
I replaced your file, and cleared cache. But still getting the error for compilation. Please advise.
 

[Exception]
Warning: Declaration of Ubertheme\Ubdatamigration\Model\ProductUrlRewriteGenerator::generateForGlobalScope($productCategories) should be compatible w
ith Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator::generateForGlobalScope($productCategories, $product = NULL, $rootCategoryId = NULL) i
n /opt/bitnami/apps/magento/htdocs/app/code/Ubertheme/Ubdatamigration/Model/ProductUrlRewriteGenerator.php on line 0
Kind Regards,
Sam

#2
Profile photo of Mall Staff 184060.00 $tone September 6, 2017
Public

Hi there,

I replaced your file, and cleared cache. But still getting the error for compilation. Please advise.

Kindly re-check, seem you have not replace with new file yet.
If after re-check the issue still persists. Let’s provide me the ssh credentials and web root path of your Magento2.
I will check further and help you out.
Regards,
Mall.

#3
Profile photo of Mall Staff 184060.00 $tone September 6, 2017
Public

Hi there,

 But still getting the error for compilation.

Kindly do more cli commands as followings:
rm -rf app/code/Ubertheme/Ubdatamigration/Model/Product
rm -f app/code/Ubertheme/Ubdatamigration/Model/ProductUrlRewriteGenerator.php
Once done, rerun the compilation command and tell me know how it goes.
Regards,
Mall.

#4

Please login or Register to Submit Answer

Written By

Comments