All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
51 views

How can I change a content entity to a config entity?

I created a project using Content Entity but now I need to change this entity to Config Entity. Do you know how I can do this?
0
votes
1answer
603 views

Programmatically translate taxonomy terms

I have a vocabulary of taxonomy terms I get through taxonomy_term_load($tid); and displays in views page. How do I get and display the terms depending on the user's language?
1
vote
1answer
747 views

500 error during installation?

Trying to install the new Drupal-COD Drupal 7 distribution, but got this error: An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows Is this the sort of error one can ...
0
votes
1answer
17 views

How do I create custom layouts for Panelizer?

I was wondering how do you create custom layouts for Panelizer in D8? In D7, I can easily create my layouts, and just add a couple of lines on my .info file to let Drupal know where my layouts are. I ...
1
vote
0answers
20 views

Having multiple active config splits causes main configuration directory to be ignored

I'm trying to have a config setup for a multisite, so that I have following config directories: default - common config dev - split for dev environment local - split for local environment <site>...
7
votes
2answers
2k views

How to setup event registration and paypal payment?

We have events and we take registrations for them. Entity Registration module is installed for that purpose and it's working great. Now, since those events are paid events, we want to implement PayPal ...
0
votes
2answers
1k views

Setup custom required field validation for a field in custom form

How can I setup custom required field validation message for a text field in my custom form. I tried below code. But it is not working. It always showing 'Please fill out this field'. $form['...
2
votes
1answer
1k views

Migrate row data into text formatted long multiple

I would like to import 3 different row values into a multiple text formatted long field. This is my migrate (plus) map yml: ... field_mytext_formmated: plugin: get source: - ...
2
votes
2answers
87 views

Managing backward compatibility

It seems (correct me if I'm wrong) that there are some classes or services that must be used in relevant cases in Drupal 9 that are not present in Drupal 8. For example, New in Symfony 4.3: Simpler ...
0
votes
1answer
491 views

Different front page template for different domains

I have Drupal 7 installation with the Domain Access module. I need to have different page--front.tpl.php templates for some of the subdomains, for example: www.example.com should have one type of ...
-2
votes
0answers
25 views

What should I use instead of hook_init()? [duplicate]

Please help me I need to run my module on initial time. I do same thing I drupal 7 but I am stuck in drupal 8. In drupal 7 I am using hook_init but In drupal 8 having limited hooks and deprecated ...
1
vote
2answers
645 views

Pager labels aren't translated

I have a site using Drupal 8.4.1 with all core language modules enabled, 3 active languages, and where English is the default language. The pager labels (e.g. "Last »") for my own views aren't ...
-2
votes
0answers
16 views

PHP memory size exhausted using Memcache [closed]

FastCGI sent in stderr: PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 137612647 bytes) Already I increase 2 times in php.ini file. But again ...
0
votes
1answer
995 views

$.cookie is not a function from form.js with block cache

I am getting this error if I turn my block caches on. I have traced back the origin back to Drupal core form.js but can't seem to see what's going on here. Any ideas? Here is the debug: form.js?v=7....
8
votes
4answers
18k views

Alternatives to hook_init()

I use hook_init() to check the users' last access time. If the last access time is yesterday, I increment a counter and set some variables. The problem is that hook_init() is sometimes executed more ...
2
votes
1answer
451 views

Use a field's values in database to populate an exposed filter's options

I have a content type with a field named year (integer). In a view, I'd like to expose this field to the user as a filter. Instead of the default text boxes, I want to populate select lists with the ...
3
votes
1answer
334 views

Webform capability issue with Chosen

The Chosen module no longer get applied to Webform select fields with the most recent updates to a Drupal Commerce 2.0 site that I am working on. I am using Chosen version 7.x-2.0-beta4+1-dev (part of ...
3
votes
1answer
51 views

Why is the output from getDefinition($type) different from getStorage($type)->getEntityType()?

In a Controller, when calling: $this->entityTypeManager()->getStorage($type)->getEntityType(), I do not have the exact same return value as: $this->entityTypeManager()->getDefinition($...
0
votes
0answers
12 views

Add row after amount of blocks

I'm trying to archieve something that looks very easy for me, but I can't find the solution. I'm using drupal 9, bootstrap 3 subtheme. I have a region (region-buttons) that has multiple blocks. {% ...
1
vote
1answer
751 views

File Transfer failed, reason: Unable to change to directory

I'm work on updates modules in my drupal site. When i access localhost/authorize.php after linked in config, i recieve this: Update failed! See the log below for more information. Your site is still ...
2
votes
1answer
1k views

Automatically clear cache

Theme: Basic 8.x-1.x-dev I am trying to clear theme data after any change is done to twig files. I see that rebuildThemeData is here: https://goo.gl/EA2YL4 Currently have this within my .theme file....
0
votes
2answers
846 views

How to disable CACHE in VIEW PAGE display

DRUPAL 8 I am using VIEW module to create a page which loads data from a database table. Seems this view page is caching because whenever I add a new record in this table via custom input form, it ...
2
votes
2answers
957 views

Problem changing colors in the mayo theme

I have installed the mayo theme on my new site. When I try to go to "appearance" menu, and change the color combination from mayo (default) to anything else, the system saves the settings. but the ...
0
votes
1answer
409 views

Different logo on different pages

I want to switch my site logo for different pages. Actually there are two site logo's that need to appear on different set of pages on my drupal 6 website. What is the easiest way of doing this? Is ...
2
votes
4answers
3k views

Override favicon output

Some of search engines (yandex in my case) want me to output favicon with type image/x-icon. But drupal 7 outputs it without this type. How could i override this through template.php or any other ...
0
votes
1answer
804 views

Set link location on logo only

I want the logo on my site to go somewhere other than the home page, but I can't seem to figure out where to change that. I'd appreciate any help you can give
1
vote
1answer
704 views

Cannot disable or replace logo

I set up a subtheme of Bartik in Drupal 7. I also set up the private file system. I was styling everything and when I went to upload a logo, the logo broke. Now the logo url is private://logo_0.png. I ...
1
vote
2answers
84 views

Subtheming to add a single template?

As a programmer, I know a great deal about Drupals backend functionality, but little about theming. I'm using Corolla as a theme, and I want to add a single Views template to the theme. Initially, I ...
2
votes
1answer
810 views

What is the correct way to create a translatable in four languages website logo with slogan?

What is the correct way to create a translatable in four languages website logo with slogan? I am thinking of creating a custom content type which will be populated in View block. Which when will be ...
2
votes
2answers
115 views

Choose theme depending on the USER_AGENT

How do I use the mobile theme if the $_SERVER['HTTP_USER_AGENT'] is mobile, and use the desktop theme if it is desktop?
1
vote
1answer
537 views

Getting a linkable table of children in hook_block_view from taxonomy_get_children (Drupal 7)

I am trying to programmatically create a block that will display all of the children of the term being referenced by the current page in a linkable table (so that I can click on any of the taxonomy ...
2
votes
2answers
88 views

Within my themes page.tpl.php file it has a reference to a lot of variables like $head and $local_styles. What file are they stored in?

Within my themes page.tpl.php file it has a reference to a lot of variables like $head and $local_styles. What file are this variables stored at so that I can looked at what each of these variables ...
2
votes
2answers
141 views

Can a block span more than one region in a theme?

Can a block span more than one region in a theme? Sometimes I would like content to do this, depending on the page. I'm aware (and heavily use) Panels which are great but I thought it would be worth ...
1
vote
3answers
1k views

Can I set a theme's logo_path programmatically?

When adding a logo file to a custom theme, I can either save my logo in the theme folder as logo.png (replacing the default logo.png from the theme starterkit I'm using), or save my logo in the ...
2
votes
3answers
2k views

allow user to set some css settings through UI

The user wants to be able to choose some sizes and colors for the look of the site. These are css rules. I have a vague vision how this could be done by a module, but maybe there is already something ...
1
vote
2answers
938 views

How do I insert site information data into another table?

I have developed website using Drupal. I have created an application without using Drupal, using another framework. In my application I also stored site logo,site name etc. I want to update my site ...
1
vote
1answer
901 views

Bartik theme main menu

I am dabbling fresh with Drupal 7 and so far having little success with getting the Menu to behave the way I want it to. My CSS and PHP basics are strong, but understanding Drupal's system is in ...
6
votes
3answers
17k views

How to override default favicon.ico?

I would like to load my own, but Drupal seems to forcefully load it's own by default behind the scenes.
2
votes
2answers
877 views

Alter Color module fieldset within theme settings form

I've set up Color module for my theme - it works pretty well, but takes too much vertical space (I have a bunch of colors). What i'm trying to do is to alter system-theme-settings form to make Color ...
1
vote
1answer
414 views

Check if logo, sitename, slogan, and secondary links exist

How do you check if logo/sitename/slogan & secondary links are enabled from within a function? (outside of preprocess_page) This seems to work for logo: $logo = theme_get_setting('logo'); if (...
2
votes
1answer
2k views

Theme settings not getting saved

I created custom settings for my theme for storing email, fb url, twitter url and g+ url. Everything is coming properly but the settings are not getting saved. I have no idea whats wrong. All the code ...
17
votes
9answers
19k views

How do I set the theme logo?

How can I set the logo in my custom theme in Drupal 8? I can see that Drupal looks for the logo.svg file. I have a PNG logo.png file that I used in Drupal 7 and I would like to re-use it. I cannot ...
2
votes
1answer
476 views

About Corolla Theme Logo

I am using my logo with the Corolla theme but its give me the following error: No setting detected for Mobile first or Desktop first. Please review "Settings > Mobile first or Desktop first" and ...
3
votes
4answers
3k views

Force an empty region to display

I'm looking for a way to force an empty region to display. I notice Omega does this via a theme-settings checkbox, but I'm unable to track down how it's done. Regardless of removing the if ($page['...
1
vote
0answers
225 views

Parsing a multi-valued theme-setting into to two defaults results in theme-settings not saving

The intention here is to parse out the two integers on either side of the dash, and save them as separate defaults. The problem I'm running into is nothing will actually save when I submit the theme-...
2
votes
0answers
662 views

Omega Sub Theme Settings Page is Blank [closed]

I have recently downloaded and installed Omega 7.X-3.1 theme on my Drupal site. I followed the handbooks instructions to create my first simple HTML5 Omega sub-theme. With the sub-theme enabled I try ...
1
vote
1answer
514 views

Accent caracter encoding

I move a Drupal site and DB from old server to new (almost same setting) the site on the new server is running "almost" perfectly, but for the accent caracter encoding... here is the problem. The ...
2
votes
2answers
151 views

Change the number of entries depending on a theme setting [duplicate]

I have a theme setting that allows the administrator users to specify how many teasers should be shown on the home page by selecting a number from 1 to 4 (through a <select> field). Is it ...
7
votes
2answers
15k views

How do I get the logo path?

I have a custom logo and I have tried to get his path in this way theme_get_setting('logo_path'), but no expected result. I am using the code in a custom block, in input PHP.
0
votes
1answer
1k views

Logo doesn't appear on the Seven theme on a fresh installation

I've got a fresh install of D7.9 and have enabled the 'Seven' theme which has an option to override the default logo in Appearance -> Settings. I have uploaded a logo file and can see it via ftp but ...

15 30 50 per page