This forum is for assistance with theme development.

AJAX errors only on production

I tried to use my custom module contains AJAX behavior and also using Webform module that works as dialog. both of them working locally but on the host i get console error as below and both of this module navigate to the module relevant path instead open up as dialog

Call custom module as a part of template and prevent access it directly

I created a module contains form which should work as a part of template or as a modal and it works for these purposes

test_form.open_test_form:
  path: 'test-form'
  defaults:
    _title: 'Test Form'
    _controller: '\Drupal\test_form\Controller\TestFormController::openTestForm'
  requirements:
    _permission: 'access content'

but if i load form path directly loacalhost/test-form will get below response as a textarea

Access to active language in views-view-unformatted-list

I made page view and added Content: Translation language (= Interface text language selected for page) and Rendering Language: Interface text language selected for page and needed override default  views-view-unformatted-list template so in my template have

Access to specific field of a custom block used in view page header

unfortunately to have different header banner for each page made by view we have to use additional elements like blocks as header, so first i created content type for my page, and collect them by view page, then created a custom block for banner image and add it as header.

the first weird thing is admin has to create and modify contents and banner image in different area!!! i have no idea about this concept

the main question is how can i access the field value of custom block put inside header of this view?

Having trouble overriding contrib module's JS in my theme

Hi there, I've tried both completely replacing the library and just replacing the one JS file that I want to override.  I have looked at the docs for this and I can't figure out what I'm doing wrong.

I'm trying to override js/dropdown-widget.js from the contrib Facets module.  I've copied that file into my own theme at my_theme/assets/js/dropdown-widget.js.

modules/contrib/facets/facets.libraries.yml

Pages

Subscribe with RSS Subscribe to RSS - Theme development