Change mysql/mariadb settings
sudo nano /opt/homebrew/etc/my.cnf
for example we can change max_allowed_packet
max_allowed_packet = 32M
sudo nano /opt/homebrew/etc/my.cnf
for example we can change max_allowed_packet
max_allowed_packet = 32M
@variable: When the placeholder replacement value is:
A string, the replaced value in the returned string will be sanitized using \Drupal\Component\Utility\Html::escape().
A MarkupInterface object, the replaced value in the returned string will not be sanitized.
A MarkupInterface object cast to a string, the replaced value in the returned string be forcibly sanitized using \Drupal\Component\Utility\Html::escape().
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: