Magento 2 PHP Fatal error: Class not found when compiling The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Create beautiful image upload in configuration magento 2Fatal error “Call to undefined function” with __() when running unit test in magento2MiBPHP Fatal error While compilingClassnames 'Void' inside vendor/magento/Fatal error: Uncaught Error: Class 'Cli' not foundMagento 2 : Added field for image upload in admin formMagento 2: Captcha overwrite fatal error on PHP 7Magento 2 - PHP fatal errorerror on magento 2 after update php 5 to 7, Warning: require(/var/www/html/vendor/magento/framework/registration.php):?Magento 2 Fatal error: Uncaught Error: Class not foundFatal error: Uncaught RuntimeException:

Simulating Exploding Dice

60's-70's movie: home appliances revolting against the owners

Circular reasoning in L'Hopital's rule

What was the last x86 CPU that did not have the x87 floating-point unit built in?

Fixing different display colors within string

Huge performance difference of the command find with and without using %M option to show permissions

TDS update packages don't remove unneeded items

What's the point in a preamp?

How many Rusted Keys do you need to get red items most of the time?

Is 'stolen' appropriate word?

What happens to a Warlock's expended Spell Slots when they gain a Level?

Single author papers against my advisor's will?

"... to apply for a visa" or "... and applied for a visa"?

What do I do when my TA workload is more than expected?

Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?

Voltage transmission

Why can't wing-mounted spoilers be used to steepen approaches?

Mortgage adviser recommends a longer term than necessary combined with overpayments

What other Star Trek series did the main TNG cast show up in?

Was credit for the black hole image misappropriated?

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

What does "spokes" mean in this context?

Make it rain characters

Windows 10: How to Lock (not sleep) laptop on lid close?



Magento 2 PHP Fatal error: Class not found when compiling



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Create beautiful image upload in configuration magento 2Fatal error “Call to undefined function” with __() when running unit test in magento2MiBPHP Fatal error While compilingClassnames 'Void' inside vendor/magento/Fatal error: Uncaught Error: Class 'Cli' not foundMagento 2 : Added field for image upload in admin formMagento 2: Captcha overwrite fatal error on PHP 7Magento 2 - PHP fatal errorerror on magento 2 after update php 5 to 7, Warning: require(/var/www/html/vendor/magento/framework/registration.php):?Magento 2 Fatal error: Uncaught Error: Class not foundFatal error: Uncaught RuntimeException:



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















When I compile I get this error:




PHP Fatal error: Class
'MagentoCatalogControllerAdminhtmlCategoryImageUpload' not found
in
/var/www/html/magento/app/code/Plazathemes/Override/Controller/Adminhtml/Category/Image/Upload.php
on line 11




EDIT with the code:



enter image description here



Still unable to fix can someone write the soltion to fix this.










share|improve this question
















bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Are you sure all composer packages are installed? If something is corrupt in your composer and you do composer install/update it won't fix it. You have to force reinstall that package. Try cleaning the vendor folder and run composer install or composer update

    – Stijn Duynslaeger - Echron
    Dec 29 '16 at 0:41











  • Can you please provide the steps to follow to do this.

    – DiLjiT singh
    Dec 29 '16 at 7:58











  • Did you remove var/di, var/generation and try run di compile again?

    – Khoa TruongDinh
    Dec 29 '16 at 14:44











  • Clear cache and generated files and again recompile. Hope this will help you

    – Kishor Hase
    Sep 25 '17 at 16:28

















4















When I compile I get this error:




PHP Fatal error: Class
'MagentoCatalogControllerAdminhtmlCategoryImageUpload' not found
in
/var/www/html/magento/app/code/Plazathemes/Override/Controller/Adminhtml/Category/Image/Upload.php
on line 11




EDIT with the code:



enter image description here



Still unable to fix can someone write the soltion to fix this.










share|improve this question
















bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Are you sure all composer packages are installed? If something is corrupt in your composer and you do composer install/update it won't fix it. You have to force reinstall that package. Try cleaning the vendor folder and run composer install or composer update

    – Stijn Duynslaeger - Echron
    Dec 29 '16 at 0:41











  • Can you please provide the steps to follow to do this.

    – DiLjiT singh
    Dec 29 '16 at 7:58











  • Did you remove var/di, var/generation and try run di compile again?

    – Khoa TruongDinh
    Dec 29 '16 at 14:44











  • Clear cache and generated files and again recompile. Hope this will help you

    – Kishor Hase
    Sep 25 '17 at 16:28













4












4








4








When I compile I get this error:




PHP Fatal error: Class
'MagentoCatalogControllerAdminhtmlCategoryImageUpload' not found
in
/var/www/html/magento/app/code/Plazathemes/Override/Controller/Adminhtml/Category/Image/Upload.php
on line 11




EDIT with the code:



enter image description here



Still unable to fix can someone write the soltion to fix this.










share|improve this question
















When I compile I get this error:




PHP Fatal error: Class
'MagentoCatalogControllerAdminhtmlCategoryImageUpload' not found
in
/var/www/html/magento/app/code/Plazathemes/Override/Controller/Adminhtml/Category/Image/Upload.php
on line 11




EDIT with the code:



enter image description here



Still unable to fix can someone write the soltion to fix this.







magento2 magento-enterprise setup-di-compile






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 29 '16 at 14:17









Khoa TruongDinh

22.2k64187




22.2k64187










asked Dec 28 '16 at 19:27









DiLjiT singhDiLjiT singh

2114




2114





bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • Are you sure all composer packages are installed? If something is corrupt in your composer and you do composer install/update it won't fix it. You have to force reinstall that package. Try cleaning the vendor folder and run composer install or composer update

    – Stijn Duynslaeger - Echron
    Dec 29 '16 at 0:41











  • Can you please provide the steps to follow to do this.

    – DiLjiT singh
    Dec 29 '16 at 7:58











  • Did you remove var/di, var/generation and try run di compile again?

    – Khoa TruongDinh
    Dec 29 '16 at 14:44











  • Clear cache and generated files and again recompile. Hope this will help you

    – Kishor Hase
    Sep 25 '17 at 16:28

















  • Are you sure all composer packages are installed? If something is corrupt in your composer and you do composer install/update it won't fix it. You have to force reinstall that package. Try cleaning the vendor folder and run composer install or composer update

    – Stijn Duynslaeger - Echron
    Dec 29 '16 at 0:41











  • Can you please provide the steps to follow to do this.

    – DiLjiT singh
    Dec 29 '16 at 7:58











  • Did you remove var/di, var/generation and try run di compile again?

    – Khoa TruongDinh
    Dec 29 '16 at 14:44











  • Clear cache and generated files and again recompile. Hope this will help you

    – Kishor Hase
    Sep 25 '17 at 16:28
















Are you sure all composer packages are installed? If something is corrupt in your composer and you do composer install/update it won't fix it. You have to force reinstall that package. Try cleaning the vendor folder and run composer install or composer update

– Stijn Duynslaeger - Echron
Dec 29 '16 at 0:41





Are you sure all composer packages are installed? If something is corrupt in your composer and you do composer install/update it won't fix it. You have to force reinstall that package. Try cleaning the vendor folder and run composer install or composer update

– Stijn Duynslaeger - Echron
Dec 29 '16 at 0:41













Can you please provide the steps to follow to do this.

– DiLjiT singh
Dec 29 '16 at 7:58





Can you please provide the steps to follow to do this.

– DiLjiT singh
Dec 29 '16 at 7:58













Did you remove var/di, var/generation and try run di compile again?

– Khoa TruongDinh
Dec 29 '16 at 14:44





Did you remove var/di, var/generation and try run di compile again?

– Khoa TruongDinh
Dec 29 '16 at 14:44













Clear cache and generated files and again recompile. Hope this will help you

– Kishor Hase
Sep 25 '17 at 16:28





Clear cache and generated files and again recompile. Hope this will help you

– Kishor Hase
Sep 25 '17 at 16:28










3 Answers
3






active

oldest

votes


















0














Seem that you're trying to override the class MagentoCatalogControllerAdminhtmlCategoryImageUpload. So, make sure your custom class will extend from this class.



class Upload extends MagentoCatalogControllerAdminhtmlCategoryImageUpload 
......






share|improve this answer






























    0














    Not sure why you are getting the error itself but if i may suggest just making your file like this?



     namespace ....
    use MagentoBackendAppAction;
    use MagentoCatalogModelImageUploader;

    class Upload extends Action

    /**
    * Image uploader
    *
    * @var MagentoCatalogModelImageUploader
    */
    protected $imageUploader;

    /**
    * Upload constructor.
    *
    * @param ActionContext $context
    * @param MagentoCatalogModelImageUploader $imageUploader
    */
    public function __construct(
    ActionContext $context,
    ImageUploader $imageUploader
    )
    parent::__construct($context);
    $this->imageUploader = $imageUploader;


    public function execute()
    ....





    I also suggest you use the Magento image uploader instead of the category uploader unless that is really your intention.
    Like here
    Create beautiful image upload in configuration magento 2






    share|improve this answer























    • Just a comment. Since i do not know the intend or the page where you are using this i can not provide a specific solution but i hope this helps

      – CompactCode
      Mar 29 '18 at 2:49


















    0














    Try to give a alias name for the extended class - as shown below:



    use MagentoCatalogControllerAdminhtmlCategoryImageUpload as CatalogImageUopload

    class Upload extends CatalogImageUopload

    -----write your code here---






    share|improve this answer























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "479"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f152244%2fmagento-2-php-fatal-error-class-not-found-when-compiling%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Seem that you're trying to override the class MagentoCatalogControllerAdminhtmlCategoryImageUpload. So, make sure your custom class will extend from this class.



      class Upload extends MagentoCatalogControllerAdminhtmlCategoryImageUpload 
      ......






      share|improve this answer



























        0














        Seem that you're trying to override the class MagentoCatalogControllerAdminhtmlCategoryImageUpload. So, make sure your custom class will extend from this class.



        class Upload extends MagentoCatalogControllerAdminhtmlCategoryImageUpload 
        ......






        share|improve this answer

























          0












          0








          0







          Seem that you're trying to override the class MagentoCatalogControllerAdminhtmlCategoryImageUpload. So, make sure your custom class will extend from this class.



          class Upload extends MagentoCatalogControllerAdminhtmlCategoryImageUpload 
          ......






          share|improve this answer













          Seem that you're trying to override the class MagentoCatalogControllerAdminhtmlCategoryImageUpload. So, make sure your custom class will extend from this class.



          class Upload extends MagentoCatalogControllerAdminhtmlCategoryImageUpload 
          ......







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 29 '16 at 0:47









          Khoa TruongDinhKhoa TruongDinh

          22.2k64187




          22.2k64187























              0














              Not sure why you are getting the error itself but if i may suggest just making your file like this?



               namespace ....
              use MagentoBackendAppAction;
              use MagentoCatalogModelImageUploader;

              class Upload extends Action

              /**
              * Image uploader
              *
              * @var MagentoCatalogModelImageUploader
              */
              protected $imageUploader;

              /**
              * Upload constructor.
              *
              * @param ActionContext $context
              * @param MagentoCatalogModelImageUploader $imageUploader
              */
              public function __construct(
              ActionContext $context,
              ImageUploader $imageUploader
              )
              parent::__construct($context);
              $this->imageUploader = $imageUploader;


              public function execute()
              ....





              I also suggest you use the Magento image uploader instead of the category uploader unless that is really your intention.
              Like here
              Create beautiful image upload in configuration magento 2






              share|improve this answer























              • Just a comment. Since i do not know the intend or the page where you are using this i can not provide a specific solution but i hope this helps

                – CompactCode
                Mar 29 '18 at 2:49















              0














              Not sure why you are getting the error itself but if i may suggest just making your file like this?



               namespace ....
              use MagentoBackendAppAction;
              use MagentoCatalogModelImageUploader;

              class Upload extends Action

              /**
              * Image uploader
              *
              * @var MagentoCatalogModelImageUploader
              */
              protected $imageUploader;

              /**
              * Upload constructor.
              *
              * @param ActionContext $context
              * @param MagentoCatalogModelImageUploader $imageUploader
              */
              public function __construct(
              ActionContext $context,
              ImageUploader $imageUploader
              )
              parent::__construct($context);
              $this->imageUploader = $imageUploader;


              public function execute()
              ....





              I also suggest you use the Magento image uploader instead of the category uploader unless that is really your intention.
              Like here
              Create beautiful image upload in configuration magento 2






              share|improve this answer























              • Just a comment. Since i do not know the intend or the page where you are using this i can not provide a specific solution but i hope this helps

                – CompactCode
                Mar 29 '18 at 2:49













              0












              0








              0







              Not sure why you are getting the error itself but if i may suggest just making your file like this?



               namespace ....
              use MagentoBackendAppAction;
              use MagentoCatalogModelImageUploader;

              class Upload extends Action

              /**
              * Image uploader
              *
              * @var MagentoCatalogModelImageUploader
              */
              protected $imageUploader;

              /**
              * Upload constructor.
              *
              * @param ActionContext $context
              * @param MagentoCatalogModelImageUploader $imageUploader
              */
              public function __construct(
              ActionContext $context,
              ImageUploader $imageUploader
              )
              parent::__construct($context);
              $this->imageUploader = $imageUploader;


              public function execute()
              ....





              I also suggest you use the Magento image uploader instead of the category uploader unless that is really your intention.
              Like here
              Create beautiful image upload in configuration magento 2






              share|improve this answer













              Not sure why you are getting the error itself but if i may suggest just making your file like this?



               namespace ....
              use MagentoBackendAppAction;
              use MagentoCatalogModelImageUploader;

              class Upload extends Action

              /**
              * Image uploader
              *
              * @var MagentoCatalogModelImageUploader
              */
              protected $imageUploader;

              /**
              * Upload constructor.
              *
              * @param ActionContext $context
              * @param MagentoCatalogModelImageUploader $imageUploader
              */
              public function __construct(
              ActionContext $context,
              ImageUploader $imageUploader
              )
              parent::__construct($context);
              $this->imageUploader = $imageUploader;


              public function execute()
              ....





              I also suggest you use the Magento image uploader instead of the category uploader unless that is really your intention.
              Like here
              Create beautiful image upload in configuration magento 2







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Mar 29 '18 at 2:47









              CompactCodeCompactCode

              1,597725




              1,597725












              • Just a comment. Since i do not know the intend or the page where you are using this i can not provide a specific solution but i hope this helps

                – CompactCode
                Mar 29 '18 at 2:49

















              • Just a comment. Since i do not know the intend or the page where you are using this i can not provide a specific solution but i hope this helps

                – CompactCode
                Mar 29 '18 at 2:49
















              Just a comment. Since i do not know the intend or the page where you are using this i can not provide a specific solution but i hope this helps

              – CompactCode
              Mar 29 '18 at 2:49





              Just a comment. Since i do not know the intend or the page where you are using this i can not provide a specific solution but i hope this helps

              – CompactCode
              Mar 29 '18 at 2:49











              0














              Try to give a alias name for the extended class - as shown below:



              use MagentoCatalogControllerAdminhtmlCategoryImageUpload as CatalogImageUopload

              class Upload extends CatalogImageUopload

              -----write your code here---






              share|improve this answer



























                0














                Try to give a alias name for the extended class - as shown below:



                use MagentoCatalogControllerAdminhtmlCategoryImageUpload as CatalogImageUopload

                class Upload extends CatalogImageUopload

                -----write your code here---






                share|improve this answer

























                  0












                  0








                  0







                  Try to give a alias name for the extended class - as shown below:



                  use MagentoCatalogControllerAdminhtmlCategoryImageUpload as CatalogImageUopload

                  class Upload extends CatalogImageUopload

                  -----write your code here---






                  share|improve this answer













                  Try to give a alias name for the extended class - as shown below:



                  use MagentoCatalogControllerAdminhtmlCategoryImageUpload as CatalogImageUopload

                  class Upload extends CatalogImageUopload

                  -----write your code here---







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 3 '18 at 9:39









                  Prasanta HatuiPrasanta Hatui

                  1,4501514




                  1,4501514



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Magento Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f152244%2fmagento-2-php-fatal-error-class-not-found-when-compiling%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

                      Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

                      Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림