ISSUES
|
SOLUTION
|
Aggregate css file in server clear cache issue to be resolved |
Need to set the temp folder in server. |
directory /tmp does not exist.
OR
Not fully protected |
Set the tmp folder path to server tmp folder location.
Location in sentora: /var/sentora/temp |
Trusted Host Settings -> Not enabled |
Insert below code in settings.php
$settings[‘trusted_host_patterns’] = array(
‘^example\.com$’,
‘^www\.example\.com$’,
‘^localhost$’,
); |
Unable to create :: The TCPDF cache directory, |
Create tcpdf/cachecahe in the temp folder |
PHP OPcode caching -> Not enabled |
Install opcode from http://php.net/manual/en/opcache.installation.php
Add these lines in php.ini
[opcache]
zend_extension=php_opcache.dll
opcache.enable=1 |
Update notifications -> Not enabled |
Enable Update Manager module in backend |
Unable To edit super user :: Commonly occured when a site is installed through drush site install. |
Issue with time zone saved go to DB table user_field_data edit timezone of the user id “1” some valid timezone say “Asia/Kolkata” |
Mismatched entity and/or field definitions |
drush entup |
Forgot Admin UserName and Password |
drush uinf uid
E.g:drush uinf 1
drush upwd username —password=newpassword
E.g:drush upwd admin —password=abc123 |
The following module is missing from the file system… |
drush sql–query “DELETE FROM key_value WHERE collection=’system.schema’ AND name=’module_name’;” |
Changing the sync directory |
Add the following line in settings.local.php or settings.php
$config_directories[‘sync’] = ‘{path to the desired folder}/’; |
Sync uuid when drush is not configured |
Go to database config table => search for “system.site”
download the data blob then edit uuid:
Then replace the uuid with the uuid from the main site (from which site is cloned). |
For more Drush Commands Click |
For more Drupal Console Commands Click |
To generate some sample content for testing purpose, |
drush genc <number of nodes> <number of comments> —types=<content type>
e.g: drush genc 3 0 –types=bank |
To import and export configuration to a custom folder |
drush config–import —source=“<folder-path>”
drush config–export —destination=“<folder-path>” |
Dump database and files |
drush sql-dump filename E.g: |
Dump database and files |
- mkdir /4spDrive/${PWD##*/}/$(date +”%Y-%m-%d”)
- drush sql-dump > “/4spDrive/${PWD##*/}/$(date +”%Y-%m-%d”)/${PWD##*/}-$(date +”%Y-%m-%d”).sql”
- zip -r /4spDrive/${PWD##*/}/$(date +”%Y-%m-%d”)/${PWD##*/}-$(date +”%Y-%m-%d”).zip docroot/sites/default/files/
- For project inside web folder
zip -r /4spDrive/${PWD##*/}/$(date +”%Y-%m-%d”)/${PWD##*/}-$(date +”%Y-%m-%d”).zip web/sites/default/files/ |
Import db and files |
-
- Copy sql and zip file to project root folder
- drush sql-drop -y; drush sql-cli < path_to_sql.sql
-
- Take backup of files if needed
- sudo mv docroot/sites/default/files docroot/sites/default/files1
- unzip files.zip
- Remove backup sudo rm -rf docroot/sites/default/files1
- Then, git clean -f
|
Site broken when aggregation is on |
- Check sites/default/files have full write permission
- Check the Temp directory configured and it is having full write permission
- If still the site is broken:
Should be a problem with the .htaccess in sites/default/files.
-
- Deactivate all lines in the .htaccess.
- Clear the cache it should work.
- Turn all htaccess rules back.
- Clear the cache it should still work.
(Reference) |
List the custom blocks and their corresponding uuids |
drush sqlq ‘SELECT id,uuid FROM block_content’ |