Reviewed, everything works. Thanks.
You can see the 5.5.14 branch code:
/**
* @file
* Affix for Bootstrap 5.
* https://www.codeply.com/users/skelly
*
*/
(function ($, Drupal, once) {
'use strict';
Drupal.behaviors.bootstrap_barrio_affix = {
attach: function (context, settings) {
var toggleAffix = function (affixElement, scrollElement, wrapper) {
var height = affixElement.outerHeight(),
top = wrapper.offset().top;
if (scrollElement.scrollTop() >= top){
wrapper.height(height);
affixElement.addClass("affix");
}
else {
affixElement.removeClass("affix");
wrapper.height('auto');
}
};
once('affixed', '[data-toggle="affix"]', context).forEach((element) => {
var ele = $(element),
wrapper = $('<div></div>');
ele.before(wrapper);
$(window).on('scroll resize', function () {
toggleAffix(ele, $(this), wrapper);
});
// init
toggleAffix(ele, $(window), wrapper);
});
}
}
})(jQuery, Drupal, once);
Please fix file 'js/affix.js'
Console error: $(...).once is not a function
Errors:
bootstrap_barrio.libraries.yml
...
- 43: - core/.jquery.once
+ 43: - core/once
...
js/affix.js
29: $('[data-toggle="affix"]').once().each(function () {
Console error:
$(...).once is not a function
carles.zapater → created an issue.
carles.zapater → created an issue.
Thanks! Could you check the 4.x branch too?
Sorry I want to filter log levels. If level checkboxes are selected in the configuration form, they are not filtered and all are passed.
I have also been able to observe that the 'log_levels' configuration of the configuration form is not used.
I have not seen in the source code that this setting is used.
Yes, I have added the service.
The problem is that ignores the 'before_breadcrumb' option. However, it does work with the 'before_send' option.
public function onOptionsAlter(\Drupal\raven\Event\OptionsAlter $alterEvent): void {
// Disable Breadcrumb (Logging)
// https://docs.sentry.io/platforms/php/enriching-events/breadcrumbs/#customize-breadcrumbs
$alterEvent->options['before_send'] = function (\Sentry\Event $event): ?\Sentry\Event {
if (in_array($event->getLevel(), ['warning', 'error', 'fatal'])) {
return $event;
}
return null;
};
}
I have also been able to observe that the 'log_levels' configuration of the configuration form is not used. Breadcrumbs of all levels are always created.
Tested in hook_cron()
function raven_sict_cron() {
\Drupal::logger('raven_sict')->notice('Notice');
\Drupal::logger('raven_sict')->warning('Warning!');
\Drupal::logger('raven_sict')->alert('Alert!');
\Drupal::logger('raven_sict')->critical('Critical!');
\Drupal::logger('raven_sict')->emergency('Emergency!');
\Drupal::logger('raven_sict')->debug('Debug');
\Drupal::logger('raven_sict')->error('Error!');
\Drupal::logger('raven_sict')->info('Info');
}
carles.zapater → created an issue.