Install memcached lib
If you get error regarding zlib
need to execute install with this command:
PHP_ZLIB_DIR=/opt/homebrew/opt/zlib pecl install memcached
If you get error regarding zlib
need to execute install with this command:
PHP_ZLIB_DIR=/opt/homebrew/opt/zlib pecl install memcached
Solution for Apple M1 - using homebrew:
> Settings -> Git -> Use System Git -> "/opt/homebrew/bin/git" (NOT "/usr/*/git")
This magically added "/opt/homebrew/bin" to SourceTree's $PATH and all git hooks started working again.
For macOS:
To get additional debug logging for troubleshooting launcher issues, set the environment variable before starting the IDE:
export IDEA_LAUNCHER_DEBUG=true
cd /Applications
./PhpStorm.app/Contents/MacOS/phpstorm
The main idea is to use <a> element with tabindex="0" attribute and data-bs-trigger should be focus
instead of click
:
<a tabindex="0" class="btn btn-lg btn-danger"
role="button" data-bs-toggle="popover"
data-bs-trigger="focus" title="Dismissible popover"
data-bs-content="And here's some amazing content. It's very engaging. Right?">
Dismissible popover
</a>
Here we extend system Drupal.Ajax.prototype.beforeSend() method. We set progress variable according to data attribute.
let ajaxBeforeSendOriginal = Drupal.Ajax.prototype.beforeSend;
// Extend Drupal.Ajax.prototype.beforeSend.
Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) {
// Set progress variable according to data attribute.
this.progress.type = $(this.element).data("ajax-progress") ||
this.progress.type; ajaxBeforeSendOriginal.call(this, xmlhttprequest, options);
};
Create file custom_base/src/EventSubscriber/FrontpageRedirectSubscriber.php:
Create file custom_base\src\TwigExtension\ActiveThemeUrlExtension.php:
Create archive:
tar -czvf theme.tgz theme_directory
v - to show process
To unarchive:
tar -xvf theme.tgz
To copy file to the server with SCP:
scp theme.tgz ubuntu@10.10.0.1:/var/www/drupal/web/themes/
Add the user ubuntu
to the www-data
group:
To remove views unsaved changes, sometimes can be usefull when after views change you cannot access edit page.
drush eval "\Drupal::keyValueExpirable('tempstore.shared.views')->delete('VIEW_NAME');"
To get query from the view:
$query = $view->getQuery();
$query_string = $query->query()->__toString();
dpm($query_string);
To get arguments:
For Drupal8+:
Manually setting the current schema version of a module
drush eval "\Drupal::service('update.update_hook_registry')->setInstalledVersion('my_module', 9001);"
Or in this way:
\Drupal::keyValue('system.schema')->set('my_module', (int) 9001);
For Drupal 7:
drush ev "drupal_set_installed_schema_version('my_module', 7025)"
To get installed version for Drupal8+:
Drupal 7:
// Disable drupal's built in cron trigger.
$conf['cron_safe_threshold'] = 0;
Drupal 8/9:
// Disable drupal's built in cron trigger.
$config['automated_cron.settings']['interval'] = 0;