how to disable compiler in magento2? - magento2

how do I disable the compiler in magento 2.0?
I have installed Magento 2.0 and then installed a theme "Porto" from theme-forest. But after installing the theme, when compiling, I got an error.
magento_user:/var/www/html/magento2$ sudo php bin/magento setup:di:compile
Compilation was started.
Interception cache generation... 6/7 [========================>---] 85% 2 mins 418.2 MiBErrors during compilation:
Smartwave\Filterproducts\Helper\Data
Extra parameters passed to parent construct: $data. File: /var/www/html/magento2/app/code/Smartwave/Filterproducts/Helper/Data.php
Smartwave\Filterproducts\Block\FeaturedList
Incorrect dependency in class Smartwave\Filterproducts\Block\FeaturedList in /var/www/html/magento2/app/code/Smartwave/Filterproducts/Block/FeaturedList.php
\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object
\Magento\Catalog\Helper\Image already exists in context object
Smartwave\Filterproducts\Block\Home\FeaturedList
Incorrect dependency in class Smartwave\Filterproducts\Block\Home\FeaturedList in /var/www/html/magento2/app/code/Smartwave/Filterproducts/Block/Home/FeaturedList.php
\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object
\Magento\Catalog\Helper\Image already exists in context object
Smartwave\Filterproducts\Block\Home\LatestList
Incorrect dependency in class Smartwave\Filterproducts\Block\Home\LatestList in /var/www/html/magento2/app/code/Smartwave/Filterproducts/Block/Home/LatestList.php
\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object
\Magento\Catalog\Helper\Image already exists in context object
Smartwave\Filterproducts\Block\LatestList
Incorrect dependency in class Smartwave\Filterproducts\Block\LatestList in /var/www/html/magento2/app/code/Smartwave/Filterproducts/Block/LatestList.php
\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object
\Magento\Catalog\Helper\Image already exists in context object
Total Errors Count: 5
The theme vendor says I need to disable compilation. How do I do that in Magento 2.0?
I have looked for this in magento2 documents, and couldnt find any answers. i can disable modules using this command below, but which one is the compiler module
sudo php bin/magento module:disable Magento_xxxx
Any help/pointers will be highly appreciated. My site is down now, and need to bring it up soon as possbile

You cannot disable the compiler. Why did the theme developer say to do that? Sounds strange.
In default and developer modes, the compiler is always enabled; generally, it's a good thing. In production mode, the compiler is disabled. But there is no way to disable the compiler in either default or developer mode.

Related

TYPO3 v11 and fluidtypo3/flux v9.5.0: Class Page does not exist. Reflection failed

I did a fresh composer installation of TYPO3 v11.5.9...
composer require "typo3/cms-adminpanel:^11.5" "typo3/cms-backend:^11.5" "typo3/cms-belog:^11.5" "typo3/cms-beuser:^11.5" "typo3/cms-core:^11.5" "typo3/cms-dashboard:^11.5" "typo3/cms-extbase:^11.5" "typo3/cms-extensionmanager:^11.5" "typo3/cms-filelist:^11.5" "typo3/cms-fluid:^11.5" "typo3/cms-fluid-styled-content:^11.5" "typo3/cms-form:^11.5" "typo3/cms-frontend:^11.5" "typo3/cms-impexp:^11.5" "typo3/cms-info:^11.5" "typo3/cms-install:^11.5" "typo3/cms-lowlevel:^11.5" "typo3/cms-opendocs:^11.5" "typo3/cms-recordlist:^11.5" "typo3/cms-recycler:^11.5" "typo3/cms-redirects:^11.5" "typo3/cms-reports:^11.5" "typo3/cms-rte-ckeditor:^11.5" "typo3/cms-scheduler:^11.5" "typo3/cms-seo:^11.5" "typo3/cms-setup:^11.5" "typo3/cms-tstemplate:^11.5" "typo3/cms-viewpage:^11.5"
and added fluidtypo3/flux, composer installed v9.5.0:
composer require fluidtypo3/flux
I created a sitepackage with sitepackagebuilder.com.
In the ext_localconf.php I registered Flux like this:
\FluidTYPO3\Flux\Core::registerProviderExtensionKey('Vendor.Sitepackage', 'Content');
\FluidTYPO3\Flux\Core::registerProviderExtensionKey('Vendor.Sitepackage', 'Page');
After adding a root page, creating a main template record, including all static templates and adding the TypoScript to the page, I opened the page in the frontend. The following error occured:
(1/2) #1278450972 TYPO3\CMS\Extbase\Reflection\Exception\UnknownClassException
Class Page does not exist. Reflection failed.
No matter what extension settings are defined or if any templates are present in Resources/Private/Tempaltes/Content/, the exception persists.
But, if I change the version of Flux to dev-development, the frontend loads perfectly fine.
Does anybody know what's going on here? What am I doing wrong?
I found the problem.
The file ext_localconf.php has a faulty condition to check the TYPO3 core version, which leads to a wrong $pageControllerName (row 136). It's Pageinstead of \FluidTYPO3\Flux\Controller\PageController::class which explains the exception message. (The wrong condition also occurs in file Classes/Integration/ContentTypeBuilder.php).
This bug has been fixed in branch development commit #19279684f1792f373d3a1fafdbde4dea0e4e12d9.

Why did Grails 4.0.10 run-app behavior change overnight?

I am suddenly getting a conflict between a class in a Grails plugin and the same class in a Grails plugin.
Grails Notification plugin has a skeleton User class defined in order to provide
for stand-alone plugin testing. The User class is defined with the same package as
the real User class in the main app. The plugin User class is NOT published with
the plugin - it is excluded from the jar. In any case, the app class should predominate,
and there is no runtime warning about duplicate classes. The plugin User class is there in
the plugin sources jar, however. This has always worked fine - until now.
So, not only am I mystified, I'm also worried because we also include a number of duplicatively
defined utility classes that are also excluded from the plugin jars - will those also be a problem?
Important: this problem was not there yesterday! Overnight corporate security applied some
updates and forced a restart on our computers, so Intellij in particular had to be reopened.
A colleague can duplicate this same new behavior on his machine, so it's not a local cache
problem on my computer - pointing to a common code or build problem?
We are running run-app via the Intellij IDE, but invoking run-app from a cmdline exhibits the same problem.
// This Grails debug console code
import com.penbaymedia.jdeis5.notification.service.EmailService // just to check existence
def svc = ctx.getBean('emailService') // in Grails Notification plugin
def user = User.findByUsername('jphiloon') // User defined in main app and in plugin
svc.getEmail(user)
/* Responds with this result:
groovy.lang.MissingMethodException: No signature of method: com.penbaymedia.jdeis5.notification.service.EmailService.getEmail() is applicable for argument types: (com.penbaymedia.jdeis5.domainobject.User) values: [com.penbaymedia.jdeis5.domainobject.User : 5265]
Possible solutions: getEmail(com.penbaymedia.jdeis5.domainobject.User), getClass(), sendMail(groovy.lang.Closure)
The following classes appear as argument class and as parameter class, but are defined by different class loader:
com.penbaymedia.jdeis5.domainobject.User (defined by 'org.springframework.boot.devtools.restart.classloader.RestartClassLoader#1378323c' and 'sun.misc.Launcher$AppClassLoader#18b4aac2')
If one of the method suggestions matches the method you wanted to call,
then check your class loader setup.
*/
/* The error shown in the application run-app console is a bit different, but unproxying the User object does not help:
2022-03-02 11:20:00,270 ERROR com.penbaymedia.jdeis5.job.AssignmentNotificationIntervalJob - No signature of method: com.penbaymedia.jdeis5.notification.service.EmailService.getEmail() is applicable for argument types: (com.penbaymedia.jdeis5.domainobject.User$HibernateProxy$hgS4G0mO) values: [<com.penbaymedia.jdeis5.domainobject.User$HibernateProxy$hgS4G0mO#9c96547>]
Possible solutions: getEmail(com.penbaymedia.jdeis5.domainobject.User), getClass(), sendMail(groovy.lang.Closure)
*/

AppBundle symfony 4

I have a problem with Symfony 4, I want generate entities from an existing database with the command :
php bin/console doctrine:mapping:import --force AppBundle xml
But an error appears :
Bundle "AppBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your App\Kernel.php file?
I try to import in the file kernel.php in registerBundles() :
new AppBundle/AppBundle();
but undefined class and when I create it in src/AppBundle/AppBundle.php :
<?php
namespace AppBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AppBundle extends Bundle
{
}
nothing change and when I retry the command :
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "AppBundle" from namespace "App".
Did you forget a "use" statement for another namespace? in /var/www/html/symfony/Mission3/src/Kernel.php:30
I would like to know if it's possible to create a bundle like that or if it exists an other command to generate entities from an existing database.
in SF4, The main application component is named 'App' by default and is not a bundle.
You have to manually create a dummy bundle under src\ directory in order to use old doctrine:command related to bundle.
see how to manually create a bundle here
After that, you can import/generate mappings/entities using doctrine:commands and use them in the App main module space, or in those bundles.
The SF4 maker tool don't provide bundle creation yet ... But I suppose the SF4 developers consider it's not an urge must have requirement, because they want us to focus on putting most code in the bundle less App main module.
In symfony 4 'AppBundle' is doesn't exist anymore. Try use 'App' instead 'AppBundle'

Symfony2 : How to make the php_intl extension available for Symfony2?

I'm trying to follow this documentation on Symfony : http://symfony.com/doc/current/book/forms.html
ok so here is my thing, I've externalised my form and created a specific form class for handling the process and being able to reuse it.
So what happen when I submit the form, whatever the info are okay or not for my class, I get this fatal Error :
Fatal error: Call to a member function setAttribute() on a non-object
in C:\Program Files
(x86)\wamp\www\QNetworks\vendor\symfony\src\Symfony\Component\Form\Extension\Core\DataTransformer\NumberToLocalizedStringTransformer.php
on line 130 Call Stack
I'm running with php 5.3.9 and my intl extension is installed and activated BUT when I run the app/check.php command I see :
[[WARNING]] Checking that the intl extension is available: FAILED
* Install and enable the intl extension (used for validators) *
So I don't understand what the problem with this extension. Should I reinstall it ?
When I go here : http://php.net/manual/en/intl.requirements.php
I see tht i can install the PECL or the ICU library, but i don't know if I should and if there is any relation with my problem ..
Your Intl extention must be configured propertly.
Check on your server if this really activated using phpinfo()
then on your php.ini activate logging:
[intl]
intl.error_level = E_WARNING
extension=php_intl.dll
and check logs
If it's activated maybe it's a malfunction. Try to redownload the dll into c:\PHP\ext\php_intl.dll
take care you have two php.ini :
*wamp\bin\php\php5.3.13
*wamp\bin\apache\apache2.2.22\bin
you should uncomment extension=php_intl.dll in both.
After enable intl extension, you need copy some files to apache bin directory. It could help you: http://www.youtube.com/watch?v=gtIcpdPzXiE

How to move Symfony Admin Generator files to a plugin?

I try to move my module which generated by the Admin Genrator to a plugin.
Error:
Fatal error: Class 'BaseFooGeneratorConfiguration' not found in ...
The action.class.php includes to files:
fooGeneratorConfiguration.class.php
fooGeneratorHelper.class.php
Both classes extends of an base class (BaseFooGeneratorConfiguration,BaseFooGeneratorHelper).
The problem is that those classes only exist in the cache.
Do i need to copy the class from cache into my plugin ?!
Have you tried clearing your cache after moving the module to your plugin?
./symfony cc