bootstrap_barrio subtheme breaks ckeditor’s media insert in custom block

I’m facing this problem (seems to be producible) in a contrib theme that breaks the ckeditor media insert button on custom blocks in the layout builder of individual nodes…
The javascript error says it’s typically caused by the theme neglecting to include proper html attributes for that entity type, but the theme’s block.html.twig is identical to that template in Bartik. This is a custom subtheme of bootstrap_barrio created with the shell script provided by bootstrap_sass (Barrio highly recommends subtheming that way). Error has been repeated on new D8 and D9 installations, and the full message on page load is:

Uncaught Error: Quick Edit could not associate the rendered entity field markup (with (data-quickedit-field-id="block_content/1/body/en/full")) with the corresponding rendered entity markup: no parent DOM node found with (data-quickedit-entity-id="block_content/1"). This is typically caused by the theme's template for this entity type forgetting to print the attributes.

and while editing a block in the layout builder, clicking ckeditor’s media insert button results in the following error (and the media dialog never opens, the “Loading…” message appears but nothing loads):

Object { message: "nAn AJAX HTTP error occurred.nHTTP Result Code: 500nDebugging information follows.nPath: /media-library?media_library_opener_id=media_library.opener.editor&media_library_allowed_types%5B0%5D=image&media_library_selected_type=image&media_library_remaining=1&media_library_opener_parameters%5Bfilter_format_id%5D=basic_html&hash=Ul_KDXiNyg8Mw95OeXpaIZUYieACO4FlRCUQkle_TCsnStatusText: Internal Server ErrornResponseText: The website encountered an unexpected error. Please try again later.", name: "AjaxError", stack: "@https://atn.ddev.site/core/misc/ajax.js?v=8.9.3:100:32n@https://atn.ddev.site/core/misc/ajax.js?v=8.9.3:643:3n" }

I was very excited about the bootstrap_barrio’s subtheme with sass, gulp, browsersync all configured with bootstrap, but maybe I should switch to radix? I’d much prefer to solve this error though, if anyone has any insight? I don’t know where to begin with javascript debugging 🙁

conditional formatting – Using a custom formula on a sheet that is constantly expanding

A custom formula for 5 possible colors, by day is used to highlight entries by DayOfWeek

Is it possible to use a format like A2:A instead of manually editing it as the sheet grows bigger?

Formula works fine, just don’t want to be editing it continuously

Example for rows A2 to A641 – can this be $A$2:$A ?

=and(isblank($A$2:$A$641)=false,OR(weekday($A$2:$A$641)=7))

How to achieve a custom post type permalink like this!

How to achieve a custom post type permalink like this!

download

download

Thanks

wp cron – Autoupdate custom type post taxonomy after date set via metafield

I am launching a site with course listings.

Using mostly Crocoblock JetEngine, I created a custom post type with a closing_date metafield to enter when the course applications closes. I also created a custom taxonomy “course-status” to choose between open/closed tag.

When a new post (course) is created, the closing date for application is entered in the metafield and the post is set to “Open”.

Any way to automatically change the taxonomy to “closed” after the date entered in the metafield?

Any help is appreciated.

8 – jQuery dependency on a custom theme is not adding jQuery?

I know that this question has been asked previously many times but any of the solutions are not working in my case so please, I request if anyone can help me with this situation please provide me assistance.
I have added dependency of the core jQuery(along with other core libraries) in my theme.libraries.yml but only core jQuery is not loading in my drupal frontend and the console is showing the error of jQuery is not defined.
Also other drupal core libraries as working fine only jQuery is not loading.

My code of various files is as follows

theme.libraries.yml

global-styling:   
  version: 1.x   
  css:
    theme:
      css/bootstrap.css: {}
      css/custom.css: {}
      css/owl.carousel.min.css: {}
      css/owl.theme.default.min.css: {}
      css/responsive.css: {}
      css/style.css: {}
      fonts/fonts.css: {}   
  js:
    js/bootstrap.js: {}
    js/owl.carousel.min.js: {}
    js/popper.js: {}
    js/scripts.js: {}   
  dependencies:
    - core/jquery
    - core/jquery.once
    - core/drupal

theme.info.yml

name: wcsb
type: theme
description: 'Another outstanding WebCube Theme'
package: Core
version: '0.1.2'
core: '8.x'
base theme: classy

libraries:
  - wcsb/global-styling

regions:
  header_bar_1: 'Header Bar 1'
  header_bar_2: 'Header Bar 2'
  header_bar_3: 'Header Bar 3'
  header_bar_4: 'Header Bar 4'
  mobile_header_1: 'Mobile Header 1'
  mobile_header_2: 'Mobile Header 2'
  slider_images: 'Slider Images'
  breadcrumb: Breadcrumb
  featured_top: 'Featured top'
  above_content: 'Above Content'
  content: Content
  below_content: 'Below Content'
  sidebar_first: 'Sidebar first'
  sidebar_second: 'Sidebar second'
  featured_bottom_first: 'Featured bottom first'
  featured_bottom_second: 'Featured bottom second'
  featured_bottom_third: 'Featured bottom third'
  footer_first: 'Footer first'
  footer_second: 'Footer second'
  footer_third: 'Footer third'
  footer_fourth: 'Footer fourth'
  footer_fifth: 'Footer fifth'

list of scripts loading

<body class="path-frontpage page-node-type-page" data-new-gr-c-s-check-loaded="14.1002.0" data-gr-ext-installed=""
cz-shortcut-listen="true">

<script type="application/json" data-drupal-selector="drupal-settings-json">
    {
        "path": {
            "baseUrl": "/",
            "scriptPath": null,
            "pathPrefix": "",
            "currentPath": "node/1",
            "currentPathIsAdmin": false,
            "isFront": true,
            "currentLanguage": "en"
        },
        "pluralDelimiter": "u0003",
        "suppressDeprecationErrors": true,
        "ajaxTrustedUrl": {
            "form_action_p_pvdeGsVG5zNF_XLGPTvYSKCf43t8qZYSwcfZl2uzM": true
        },
        "user": {
            "uid": 0,
            "permissionsHash": "508c848d9cf616f3b3735479b8cad945e128b7dbb0a534206170c7d3643afe05"
        }
    }
</script>
<script src="/core/assets/vendor/jquery-once/jquery.once.min.js?v=2.2.3"></script>
<script src="/core/misc/drupalSettingsLoader.js?v=8.9.13"></script>
<script src="/core/misc/drupal.js?v=8.9.13"></script>
<script src="/core/misc/drupal.init.js?v=8.9.13"></script>
<script src="/themes/custom/wcsb/js/bootstrap.js?v=8.9.13"></script>
<script src="/themes/custom/wcsb/js/owl.carousel.min.js?v=8.9.13"></script>
<script src="/themes/custom/wcsb/js/popper.js?v=8.9.13"></script>
<script src="/themes/custom/wcsb/js/scripts.js?v=8.9.13"></script>
<script src="/modules/contrib/commerce/modules/cart/js/commerce_cart.js?v=8.9.13"></script>

console errors
console showing jquery is not defined errors.

How to dynamically list document library titles onto a custom SharePoint page

With SharePoint Online, if I have 7 document libraries within a site, titled like so…

food
keys
cars-2019
cars-2020
cars-2021
pets
family

…Is there a way I can dynamically list and link all my cars_x document library titles onto a custom SharePoint page, whenever a cars_x document library is created?

Or

On that custom SharePoint page, can I create a dynamic navigation menu that picks up and displays what I am trying to query…?

8 – Views custom relationship joined by plain text field

Let’s say I have a node type named ‘Book’.
‘Book’ nodes have ‘publisher’ field.
I want to create a node view which displays these two columns:

  • book title
  • title of a book published by the same publisher

enter image description here

Desired results is like this.
book view

The problem is I cannot use entity reverse relationship which is normally used to connect entities because ‘publisher’ field is not entity reference field.

So I added the code to my_module.views.inc.

funciton my_module_views_data() {
  // it seems first node's 'node__field_publisher' is already loaded, so join second node's node_field_data directly. 
  $data('node__field_publisher')('node_field_data') = (
    'title' => t('Same publisher books'),
    'help' => t('Get books sharing publisher'),
    'relationship' => (
      'id' => 'standard',
      'label' => 'Same publisher books',
      'left_table' => 'node__field_publisher',
      'field' => 'entity_id',
      'base' => 'node_field_data',
      'base field' => 'nid',
    ),
  );
}

It created join and relationship ‘Same publisher books’ became available.

LEFT JOIN {node_field_data} node_field_data_node__field_publisher ON node__field_publisher.entity_id = node_field_data_node__field_publisher.nid

If I click ‘Add’ in ‘field section’, select ‘Title’, set ‘Same publisher books’ as ‘relationship’, it adds query to SELECT statement like this

node_field_data_node__field_publisher.nid AS node_field_data_node__field_publisher_nid

But no titles.

I thought if I make a relationship to other node, it automatically loads field values belonging to the node(e.g. title), but is it a misconception?
How to get titles in this case?

I built a custom .NET Core distributed system with Docker, React, Consul and RabbitMQ. Would anyone

Advertising

y u no do it?

Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

Starts at just $1 per CPM or $0.10 per CPC.

8 – Current page link is not adding in my custom theme full pager links

I have created a view page showing products with full pager and full pager links are showing currently but current page link is not been added in the pagination links and because of this pagination links are showing home page and adding the parameters to home page links.
I have checked using Bartik Theme and other Contributed Themes available on drupal.org and full pager is working correctly as it should be(by adding current page links in the pager links) but it is not working only in custom theme.
I request, please help me with this as, I am beginner with Drupal and full pager is needed in almost all the projects.

Note: I am also using better exposed filters with exposed block.

Pager Links same in other themes also

Current page link is not adding in pager links in other themes current page link not showing in html but it is being added after page load

custom taxonomy – Warning: Undefined variable $post in C:xampphtdocs………after PHP upgrade

I use localhost for testing and debugging sites, before making changes to the live site. Because MySQL failed in XAMPP, I had to install XAMPP from scratch. I’m now using PHP version 8.0.3. Everything worked yesterday, so it must have something to do with upgrading my version of PHP.

This code used to work. It displayed the artist name (custom product taxonomy) with the associated product in WooCommerce. Now, it’s absolutely not working.

This was my code:

<div style="background-color: #f6f6f6 !important;">
<?php $terms = get_the_terms( $post->ID, 'product_artist' );
    if ( !empty( $terms ) ){
        // get the first term
        $term = array_shift( $terms );
    }
    $artist = $term->slug;
    $url = get_site_url();
    $name = ucwords(str_replace('-', ' ', $artist));
?>
    <div class="by-artist" style="color: #BCA47B !important; background-color: #F6F6F6; font-size: 14px; padding: 5px 0px 10px 0px">
    <a href="<?php echo $url . '/artists/' . $artist; ?>">
    <?php echo $name; ?></a>
    </div> 
</div>

Does anyone know why this would stop working in PHP 8xx? More importantly, how do I fix it.

Thank you.