How do I get a list of all CSS and JS that are attached to a page?

How do I get a list of all CSS and JS that are attached to a page?

In Drupal 8, how do I get all CSS and JS that is attached to a page? In Drupal 7, I could use drupal_add_css() or drupal_add_js() without arguments, to get an array containing a list of all the files/inline added to a page. I’m developing a module that will... read more
How do I get a list of all CSS and JS that are attached to a page?

Drupal sitemap still contains urls of deleted pages

I’ve deleted some products from my commerce kickstart database by means of standard Drupal commerce kickstart tools. But it looks like something gone wrong. Because some deleted pages urls still remain in sitemap,so Google webmaster tools tell me about 404... read more
How do I get a list of all CSS and JS that are attached to a page?

How to add destination parameter in hook url_inbound_alter

Hi I have used hook_url_inbound_alter to alter the URL. When I access user/%/order anonymously it should redirect ti user/login. I have used below code function module_url_inbound_alter(&$path, $original_path, $path_language) { $argument = explode(‘/’,... read more
How do I get a list of all CSS and JS that are attached to a page?

Hybridauth facebook and google login not works in live server

I am using the HybridAuth Social Login for social media login for my website. The login works in my local server but the user profile picture is not fetched. But in live server nothing works, it just returns some message like so: Closing.. I also changed my website... read more
How do I get a list of all CSS and JS that are attached to a page?

DrupalCoreDatabaseDatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1 no such table:

I’m getting a strange error with my Drupal site. The error is as follows: DrupalCoreDatabaseDatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1 no such table: router: SELECT name, route, fit FROM {router} WHERE pattern_outline IN ( :patterns__0 ) AND... read more
How do I get a list of all CSS and JS that are attached to a page?

Confirmation pop up on login submit

I have built a site using drupal 7.41. I have added the login form by adding this line in my page.tpl.php “print render($page[‘login_container’]);”. When user click on the login button I want to show a popup with options “yes” and... read more
How do I get a list of all CSS and JS that are attached to a page?

Create file through services

I’ve been trying to create and update users and their pictures through REST calls using the services module. So far, I’ve got creating and updating users to work, but creating files to set their profile pictures still doesn’t work. I try to do a POST... read more
How do I get a list of all CSS and JS that are attached to a page?

Aggregating by date field

I’ve been trying to aggregate (SUM) by a date field with a custom format (YYYY, MM) but its not working as expected. I tried Views Date Format SQL and Merge rows modules but didn’t work for me. Also, some other suggested solution is to group by field... read more
How do I get a list of all CSS and JS that are attached to a page?

How to prevent a node from being saved/updated by using the Rules module?

I’ve created a content type ‘H’. The following rule (using the Rules module) has been built to prevent the node from being saved/updated if the field ‘a’ is larger than 5. Event: Before saving content of type ‘H’. Condition:... read more
How do I get a list of all CSS and JS that are attached to a page?

Disable/remove javascript

does anyone know how to disable a javascript loaded by drupal? <script src=”/profiles/ncr/themes/contrib/bootstrap/js/bootstrap.js?ny8c02″></script> I tried the following in the template.php file but no luck. function... read more
How do I get a list of all CSS and JS that are attached to a page?

How to integrate a custom header and footer?

I need to add a custom header to a theme that I am currently building. The only way I can seem to get the header and footer to show up on the page is to hard code it into the page.tpl.php file. I’ve tried to use the include trick, but that isn’t working.... read more
How do I get a list of all CSS and JS that are attached to a page?

Uncaught TypeError: Cannot set property ‘bootstrap’ of undefined

I’m receiving the following two errors, i’m unsure how to fix them. after doing some research this file has had issues before. The solutions did not solve my problem. Could this be a simple script load order? Uncaught TypeError: Cannot set property... read more
How do I get a list of all CSS and JS that are attached to a page?

What instantiates a CacheBackendInterface?

I am working on upgrading a module and there is a use statement use DrupalCoreCacheCacheBackendInterface; What is the point of using an interface like that? Interfaces dont have actual code and this .module file doesnt inherit from that interface. Now when the module... read more
An error occured while attempting to process /ajax/ajax_facets/refresh:$.blockUI is not a function

An error occured while attempting to process /ajax/ajax_facets/refresh:$.blockUI is not a function

Ajax facets work but I get an error “An error occured while attempting to process /ajax/ajax_facets/refresh:$.blockUI is not a function” when I click on ajax links with checkboxes for the facets for the first time. I am using search api views as per... read more
How do I get a list of all CSS and JS that are attached to a page?

How can I rewrite the output of image field to become a div with this image as a background image?

I have a view to display a content that have an image field, and I need to display this image as a background image of a div so I can apply some CSS on it. what I tried to do is to rewrite the output of this field using twig to be like this: <div... read more
How do I get a list of all CSS and JS that are attached to a page?

How can I load entity form for comment?

I want to load entity form for comment entity type. I can load entity form for node (entity type = node and bundle = article). But the entity type = comment and bundle = comment. Here is the code of loading entity: $values = []; $definition =... read more
How do I get a list of all CSS and JS that are attached to a page?

How to send email invite user fill in webform automatically?

I’m using drupal 7, and had a seminar questionnaire form created using webform. I would like to invite seminar attendee to fill in this questionnaire after they attend the seminar, by sending them email with link to the questionnaire. Rather than manually open... read more
How do I get a list of all CSS and JS that are attached to a page?

How can I programmatically remove the file from a managed_file form element?

I have a form where users upload images. When an image is submitted it is validated against various criteria. If the validation fails the user is returned to the form but the failed file is still showing in the file upload element with the remove button. I have been... read more
Mini Calendar As Views Exposed Filter

Mini Calendar As Views Exposed Filter

I would like to have a calendar be displayed as a filter for a view. When a user clicks on a date on the calendar the views result on this page are updated (preferably via Ajax) to show the chosen dates event. Such as the design below. The calendar should not be a... read more
How do I display, in a ColorBox popup, a caption AND a title (caption from image ‘alt’ attribute and title from ‘title’ attribute

How do I display, in a ColorBox popup, a caption AND a title (caption from image ‘alt’ attribute and title from ‘title’ attribute

I am trying to display in a ColorBox popup, a caption AND a title (caption from image ‘alt’ attribute and title from image ‘title’ attribute). The colorbox is opened when an image is clicked. Here is an example of what I want to do. The img... read more