113
votes
Required parameter 'theme_dir' was not passed
Just in case if you are removing theme directly(Not in Magento way).
Then follow these steps.
STEP 1 : File Operations
Delete the content from app/design/frontend/<Vendor> (make sure you ...
95
votes
Accepted
Magento 2 backend session timeout
Stores > Settings > Configuration > Advanced > Admin > Security > Admin
Session Lifetime (seconds)
Also, there is a possibility to set this parameter directly to the database, just put a value ...
58
votes
Accepted
Magento 2: Default Values for `system.xml` Configuration
yes, Magento 2 still allows you to define the default values inside a configuration file.
namespace\modulename\etc\config.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/...
56
votes
Accepted
Magento 2 - How to get the extension's configuration values in the phtml files?
You can create a function for getting configuration values in your custom module's helper.
<?php
namespace Vendor\Module\Helper;
class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
...
51
votes
Accepted
How can I change the default product images sizes on Magento 2?
Magento uses the file called view.xml which is maintained at the theme level of the application.
So for example, if you are using the default theme luma you should find the view.xml under vendor/...
51
votes
Accepted
Magento 2 : Field depends in system.xml when fields are not in the same group
Field id from depends node must contain section, group and field id's of the field you want to depend
<depends>
<field id="section_id/group_id/field_id">1</field>
</depends&...
44
votes
Accepted
Magento CSS and JavaScript not loading due to using file system path
Magento using full path urls to access CSS files is a common error that results from two things happening:
Having Merge CSS Files Enabled
Magento being unable to read/write to the media/ folder.
To ...
39
votes
Magento 2 - Homepage is 404
It can happen if one of the products is miss-configured/bad-saved/bad-imported especially url_rewrite table is missing request_path value.
What i did to fix it...
Open MySQL console & run this ...
34
votes
Accepted
Magento 2.2.0 missing admin developer configuration
Check your Deployment Mode it is in Production.
To enable the developer tab menu under the Advanced You need to change it to Developer Mode
So run this command : php bin/magento deploy:mode:set ...
33
votes
Accepted
Required parameter 'theme_dir' was not passed
This error message means that you have a theme configured which doesn't exist on the file-system (any more).
It can be easily fixed by selecting a valid theme instead. Go to Content -> Configuration, ...
31
votes
Accepted
Magento 2. Retrieve information from env.php programmatically
Have a look at \Magento\Framework\App\DeploymentConfig:
Inject a deployment config object of \Magento\Framework\App\DeploymentConfig in your code
private DeploymentConfig $deploymentConfig;
public ...
29
votes
How to change the Admin session time in Magento?
There's an menu item for this in:
Stores > Configuration > Advanced > Admin > Security > Session Lifetime (Seconds)
Also check the php environment variables
php_value session....
25
votes
Accepted
How can I set per-website defaults in config.xml?
You can add this using the <stores> node in your config.xml as follows.
<stores>
<store_code>
You can also do this on website level with the <websites> node in your ...
25
votes
Accepted
How to create a input tag have disable attribute in system.xml Magento 2
I think <frontend_model> works for you as like Magento1
<field id="recipient_email" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
...
25
votes
Accepted
Magento 2: Programmatically Add a Value to `core_config_data`
There is the same saveConfig method: https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Model/ResourceModel/Config.php#L26-L61
A usage example from the core: https://github.com/...
24
votes
Magento 2: Programmatically Add a Value to `core_config_data`
I wouldn't use a model or a resource model, but \Magento\Framework\App\Config\Storage\WriterInterface or \Magento\Framework\App\Config\ConfigResource\ConfigInterface (the first delegating to the ...
24
votes
Where do I find the SYSTEM VALUE defaults? magento 2.1
The system values are the default values each module can define in its config.xml. These are values that you can not change, the checkbox is something like "reset to manufacturers settings".
This ...
21
votes
How to add a custom helper in my module?
Create: app/code/Company1/Module1/composer.json
{
"name": "company1/module-module1",
"description": "",
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"magento/framework": "...
20
votes
Magento 2 backend session timeout
Check attached image screenshot for better understanding of admin process.
Go to Stores->Settings->Configuration->Advanced->Admin->Security->Admin Session Lifetime (seconds)
And check screenshot.
19
votes
Accepted
what is the difference between disable module output and module active = true
System > Configuration > Advanced > Disable Modules Output will not actually disable that module. It work as the name suggest, disable modules output.
When you look at
abstract class ...
19
votes
Accepted
How to get store admin email address and name in Magento 2?
Try the below code -
<?php
namespace Custom\Module\Controller\Index;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Store\Model\ScopeInterface;
class Index extends \Magento\...
18
votes
How do I enable version 1.9 maintenance flag with admin access
Here's one solution:
Open index.php in root and add (remembering to edit the ‘allowed’ array to contain the IP’s you want to be able to access the site);
$ip = $_SERVER['REMOTE_ADDR'];
$allowed = ...
18
votes
Accepted
Magento 2: Does Module Sequence Impact Layout Handle XML Loading Order?
The sequence in module.xml has an impact on app/etc/config.php. This file gets updated when you run bin/magento module:enable Vendor_ModuleName so if you have added/changed sequences I'd suggest ...
17
votes
How to change the Admin session time in Magento?
Solution for Magento 2.0
For Magento 2 it can be found in Left Hand Panel on the Admin.
Stores > Configuration > Advanced > Admin > Security
Admin Session Lifetime (seconds) option in the main ...
16
votes
Accepted
How can I have a custom XML file in modules merged as one in Magento 2? (MageStackDay mystery question 2)
In Magento 2 this is handled by the \Magento\Framework\Config\Reader\Filesystem class. This class allows you specify the xml file you want to merge.
The following part will merge all files found in ...
16
votes
Accepted
Magento 2: How to Check if a Module's Installed
Maybe you are looking for this?
lib/internal/Magento/Framework/Module/Manager.php
/**
* Whether a module is enabled in the configuration or not
*
* @param string $moduleName Fully-qualified ...
16
votes
Accepted
Create beautiful image upload in configuration magento 2
In system.xml you should add this code below:
<field id="upload_image_id" translate="label comment" type="image" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
<...
16
votes
Accepted
How can I set configuration values in Magento 2?
This seems to work:
class InstallData implements InstallDataInterface
{
public function __construct(
LoggerInterface $loggerInterface,
\Magento\Framework\App\Config\...
16
votes
Accepted
Magento 2 - How to read the values in etc/config.xml?
You cannot read the values directly from etc/config.xml.
I mean, you can, but there is no point in reading directly from there since the values may be overwritten from the stores->configuration ...
15
votes
Accepted
Check if EE version or CE by code
Since CE 1.7 you have Mage::getEdition() that gives this information:
/**
* Magento edition constants
*/
const EDITION_COMMUNITY = 'Community';
const EDITION_ENTERPRISE = 'Enterprise';
const ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
configuration × 1000magento2 × 301
magento-1.9 × 154
module × 88
admin × 86
system.xml × 59
xml × 51
adminhtml × 46
magento-1.7 × 45
database × 41
magento-1 × 40
magento-2.1 × 36
magento-1.8 × 35
cron × 30
extensions × 29
layout × 28
theme × 26
multistore × 26
event-observer × 24
system-config × 23
php × 22
overrides × 22
ce-1.7.0.2 × 22
core-config-data × 22
error × 21