Export translations of field labels

Export translations of field labels

Drupal 7. I work on multi language site. I have a content type with entity translation fields. I’ve added translation to field labels and settings on my DEV copy of site and now I need to export and import it to Production. Is there any module in Drupal 7, that... read more
How do I use the login for an external application?

How do I use the login for an external application?

Long ago I built a php based application for room reservations which basically ran on its own – outside the website’s CMS. It was part of what I would now call a custom made intranet – or “custom-app”. Now the main website finally runs on drupal... read more
How do I use the login for an external application?

Can you change the list builder class used by an entity?

There’s an entity created by another module and I’d like to change some of the fields used on a listing page. Currently that page is using the entity’s list builder class. Is there a way I can define a new list builder class, make my changes, and use... read more
How do I use the login for an external application?

entity_metadata_wrapper langcode always prints default language

I’m using entity_metadata_wrapper with entity translation to print fields in a template, but it always prints the default language when using a langcode in the options. $wrap = entity_metadata_wrapper(‘node’, $node->nid,... read more
How do I use the login for an external application?

How do I programmatically use the S3FS module?

I’ve included S3FS module in Drupal 7. I’m able to store files by using S3FS as a field of a node. Now, I need to store a file on S3 bucket when a cron job is executed. How can I programmatically use the module? read more
How do I use the login for an external application?

Drupal as a RestAPI

I have been using Drupal for a while to build medium to large CMS systems; love it. From time to time I have to build a RestAPI. Usually I use either Laravel, Lumen or Slim. The only reason why I don’t use Drupal is because the bootstrap / overhead is so high in... read more
How do I use the login for an external application?

Alter product variation view

I want to alter product variation view and want to display a new form which value depends on variation price. I can add the field to the node using hook_node_view_alter() but i want to add it to the product variation right after the price field. I just need to display... read more
How do I use the login for an external application?

How do I set a specific image header for each page?

I am trying to have a header with a different image for each page of my site. I believe I should be creating a block. I don’t want to create x blocks for x pages, and I prefer to do it programmatically. So I developped a block using in SubheaderBlock.php. /** *... read more
How do I use the login for an external application?

Email Attachment File Path

I am using Drupal 7 with the WebForm and MIME Mail modules. I’ve got webform attachments being sent in the email working fine. However the email also contains a path to view the email in a directory on the server. Currently, it’s set to... read more
How do I use the login for an external application?

watchdog truncate or delete

Watchdog table has become so big that, truncate cascade or delete command in the table is not working at all. The moment the server encounter a DELETE command in watchdog, it gets busy in executing that, all resources are being occupied by DELETE command and server... read more
How do I use the login for an external application?

Forwarding request to a content page

How can I forward a request from module to a content page? I have got a module that authenticates users; once authenticated, the module should forward the request to a content page or node (not redirecting). public HttpKernel::forward($controller, array $attributes =... read more
How do I use the login for an external application?

How to programmatically assign user roles

I am assigning a role to user by this code: $user = user_load($user->uid); $role = user_role_load_by_name(“10-dis”); $user->roles = $user->roles + array($role->rid => $role->name); user_save($user); I need to replace this role with a new... read more
How do I use the login for an external application?

Change contact setting flood limit

I want to change the contact setting flood limit, but I don’t find the correct place. How I change the flood limit for sent messages? read more
How do I use the login for an external application?

Define permissions for Actions?

function custom_mod_action_info() { return array( ‘custom_mod_delete_user_cats’ => array( ‘label’ => t(‘Delete a users cats’), ‘type’ => ‘user’, ‘configurable’ => FALSE,... read more
How do I use the login for an external application?

Drupal Commerce – product attribute price based on quantity

I’m here with a tricky question about Drupal Commerce. Here’s my need: I have a group of products that have a variable price based on quantity. Each product has specific (only for that product) attributes that can modify the price. [The real problem] Each... read more
How do I use the login for an external application?

Unique taxonomy term

I need a specific vocabulary (A) that has unique terms. I don’t want to do validation at form level because I want to be able to add term from everywhere. I successful used hook_entity_bundle_field_info_alter() and addConstraint() to be sure one specific field... read more
How do I use the login for an external application?

Default value to ‘datetime’ field in form loaded from the database

I want to display the datetime field on my Drupal 8 form with some date loaded from the database, but the front end always shows empty fields as if no data has been provided. I tried several combinations to default_value field, but none of them are showing any thing.... read more
How do I use the login for an external application?

After upgrading, no content types under node/add

I am updating a Drupal/Tripal site on a test system. When I try to add content after migrating core using /#overlay=node/add or /node/add I get: You have not created any content types yet. Go to the content type creation page to add a new content type. However, under... read more
How do I use the login for an external application?

How to keep URL parameters on subsequent pages after a form is submitted?

I’m sending a referral form out to my email database and I’ve got it set up so that their email addresses get passed through and appended to the form URL like this: http://www.holbrooktravel.com/referral-form?emailid=sarah@holbrooktravel.com I’ve got... read more
How do I use the login for an external application?

Getting a menu delivered via REST

I am trying to get a menu via REST and I’ve created a new module and rest resource plugin that allows for GET on /entity/restmenu/{menu_name}. I can successfully return this example json using this function when I hit the URL. public function get(EntityInterface... read more