0

Friends,

I am working on a Magento 2.3.5-p1 site Server transfer work (to a different and better provider) In this new site with exact same settings, when compiling, I am facing this error -

 Class Magento\MediaGallerySynchronizationApi\Api\SynchronizeFilesInterface does not exist

All files are uploaded, re-uploaded (x2) and verified. PHP version (7.3) is set as recomended by Magento doc.

What's the issue?!

2 Answers 2

0

Here are some steps you can take to resolve this error:

1. Clear the generated code directory by running the following command in your Magento 2.3.5 root directory:

rm -rf generated/

2. Run the compilation process again by running the following command:

 php bin/magento setup:di:compile

3. If the error persists, try running the following commands in your Magento 2.3.5 root directory:

composer install
composer update

This will update any dependencies that may be causing the issue.

4. If none of the above steps work, try disabling any third-party modules that may be causing the issue. To do this, run the following command:

php bin/magento module:disable Vendor_Module
  • Replace "Vendor_Module" with the name of the module that you suspect is causing the issue.

  • After disabling the module, clear the generated code directory and run the compilation process again.

Hopefully, one of these steps will resolve the "Class SynchronizeFilesInterface does not exist!" error in Magento 2.3.5.

0

Take a look at this interface Suppose I named it as RepositoryInterface.php.It will throw an error because I must use the same name I placed in the code near the word interface.(look at line 5)

<?php
namespace Amasty\Example\Api;
use Magento\Framework\Api\SearchCriteriaInterface;
use Amasty\Example\Api\Data\AmastyInterface;
interface AmastyRepositoryInterface //here is the name which you need to use for naming that interface
{
    /**
     * @param int $id
     * @return \Amasty\Example\Api\Data\AmastyInterface
     * @throws \Magento\Framework\Exception\NoSuchEntityException
     */
    public function getById($id);
 
    /**
     * @param \Amasty\Example\Api\Data\AmastyInterface $amasty
     * @return \Amasty\Example\Api\Data\AmastyInterface
     */
    public function save(AmastyInterface $amasty);
 
    /**
     * @param \Amasty\Example\Api\Data\AmastyInterface $amasty
     * @return void
     */
   public function delete(AmastyInterface $amasty);
 
    /**
     * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
     * @return \Amasty\Example\Api\Data\AmastySearchResultInterface
     */
   public function getList(SearchCriteriaInterface $searchCriteria);
}

Just Make sure the names are the same.

2
  • Details pls. I am not the developer of this Magento site, I am only doing the server transfer work.
    – Ayan
    May 4 at 17:49
  • Check my updated answer
    – Harun
    May 5 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.