Questions tagged as ['7']

Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.
Score: 0
user3108268 avatar
Set a Data Value from Text field to Term Reference field
us flag

Node has two fields:

  1. Text field
  2. Term reference field (autocomplete?)

The Text field is old and already has 500 nodes with 500 unique values.

The Term reference field is new and needs to contain same data.

So e.g. one node has Text field value of 123, the Term reference field also needs somehow to have it set to 123?

enter image description here

In Rules Set a value data only lets you copy content from term reference field ...

Score: 0
Rog Boy avatar
Checkbox Ajax call back giving me error
ma flag

New to drupal 7, following code should work fine according to my knowledge can someone help me why ajax give me error in console ? and what the solution

Code

function user_activity_tree_structure_showoptional_form($form, &$form_state, $base_nid) {
      $form['enablecond'] = array(
        '#type' => 'checkbox',
        '#title' => "Checkbox  ",
        '#ajax' => array(
        'callba ...
Score: 0
Dimetry avatar
How can I disable these URLs?
cn flag

In Drupal 7, the following URLs show the same node.

This doesn't happen in Drupal 8.

How can those URLs be disabled?

Score: 0
Rog Boy avatar
get translation programmatically of field value in specific language
ma flag

I have created a content type (pdf_form) to which I added a field_gender_languagetest with two options, male and female. I translated both the options in German using the translation tab.

Now I am generating a report of the data filled by users using that content type.

Is there any way to programmatically get that translation?

I am trying this code, but it doesn't work.

t('male', array(), array('langcod ...
Score: 0
How do I fix the "You're attempting to access the site via IP address or invalid hostname." error?
cn flag

I'm running Drupal 7 on Pantheon and have started getting the following error message whenever I try to save content.

You're attempting to access a Pantheon site via IP address or invalid hostname. Please use a valid hostname.

I've found a number of related issues online:

Score: -1
Rog Boy avatar
Custom translation function
ma flag

I need own translation function in my custom module where i have defined language codes ('en','ja','de'....etc) Now i just wanted to pass word and language code as a parameter and it returns translation of that word according to language code.

I am trying this inside my translation but it doesn't work it is returning 'yes' instead i don't know why.

 $japanese_value = t('yes', array(), array('langcode' ...
Score: 0
Can the Mailchimp module email node content?
ng flag

I have a blog page. I want to add a sign-up box to collect email addresses so I can email everyone when a new blog entry is added. As I'm on shared hosting, I believe there is less chance of them getting marked as spam if I use a service such as Mailchimp to send the emails.

The Mailchimp module has a signup form. However, as far as I can tell, I can only send email through the Mailchimp 'campaig ...

Score: 0
Securing admin account, silly "solution" found
ng flag

Hello fellow Drupalers,

I've been given the task of securing our admin account, on our websites (drupal 7) from outsiders.

My first thought was 2FA and I looked at some of the modules (tfa, google auth, etc) and they seem to be doing the job okay.

But as I was fiddling around I accidentally deleted the admin password.

Now I cannot login through the website with the admin account, but I can via drush ...

Score: 0
Stanley Fernandes avatar
How to move Panels with content from development site to live?
gt flag

I want to move the content which is there on panels from local to dev. (Panopoly module is used on the project) So that I don't have to re-create the content on dev. I have tried to used this modules but it was not working : Features Node Export Panels Import

I wanted to export the panels with content so that I don't need to add the content all over again and that the panels have the same class with the  ...

Score: 0
Why do I get "The file could not be created." on a site I locally duplicated?
jp flag

I've duplicated an online site to a WAMP localhost site. The front page layout is broken and the front page shows this error.

The file could not be created. The website encountered an unexpected error. Please try again later.

The WAMP PHP error log contains about 20 copies of the following 2 errors.

PHP Notice: unserialize(): Error at offset 347 of 1093 bytes in C:\wamp\www\example.local\sites\all\modu ...

Score: 0
Toki avatar
Error page after Paybox offsite validated payment
id flag

Working on Drupal 7.81 and Commerce Paybox 7.x-1.3

Everything is going well except for the redirection from Paybox to my e-commerce site, I constantly have an error page after redirection. Paybox refers to https://monsite.org/checkout/[order-number]/payment/return/hash ... and displays an error page, while behind everything is validated (I receive confirmation emails from ordered). Once refresh, I find ...

Score: 0
Sanjin Rosic avatar
Multiple image sets shown in a view using Colorbox
nz flag

I need to have multiple image sets in a content type. I need to output them in a view that would show first image in the set (and cycle through the rest in that set) in Colorbox.

I tried to set up a paragraph instance that has an image field and a caption (text) field. It works great for the content editor because it looks like a set. They can keep adding images to one paragraph instance and can click  ...

Score: 0
MrSnrub avatar
Is there a way to add a variable to the variable table through the Admin menu
in flag

Can I set a new key/value pair for the variable table from the Administrator admin/config menu in a Drupal 7 site? I don't want to have to create a one-time custom module that only contains a variable_set() function.

Score: 0
BassPlaya avatar
How to export 1 or several specific rules?
ma flag

I want to export one or more specific rules or components using Drush.
I do have a script to export all the rules and components.

drush --pipe rules-list | xargs -I{}  sh -c "drush rules-export '{}' > '20210623-new-Rules-export-offline/{}.txt'"

20210623-new-Rules-export-offline is the directory where the exported rules are saved.

Is there something I need to change to this code in order to export th ...

Score: 0
BassPlaya avatar
How to use integer fetched from an Entity as an Entity ID?
ma flag

I have a rule component that is supposed to fetch an integer from a property of an entity named "Course" (ECK property). This property is not an entity reference but an integer. I use this property to set the number of Courses "cloned" on the "original course ID" once an entity of Course is "cloned". The cloning works but my component works ONLY IF I use it in my Views Entity VBO as an action. There I s ...

Score: 0
How can I show a flipbook as block in the front page?
cn flag

I've installed the FlipBuilder module that's created via the software and can view the flipbook on its own url, but I want to put a copy of my flipbook on the front page, in its own block or in a panel, but I just can't successfully do this.

I have tried doing it with an iframe, but it says it's refused, perhaps to avoid x-frame issues.

Score: 0
Drush issue duplicating includes/ directory
za flag

Using drush either globally or with a composer installed version, I get this double includes showing up in my fatal error (/includes/includes/):

include_once(/srv/www/htdocs/sites/drupal/includes/includes/entity.inc): failed to open stream: No such file or directory bootstrap.inc:3492 [warning] include_once(): Failed opening '/srv/www/htdocs/sites/drupal/includes/includes/entity ...

Score: 0
invalid token: [node:title] when Token module installed
om flag

I'm on Drupal 7.80 and a Drupal newb so help with how to debug as well as things to try appreciated.

Taking over a Drupal install that might have some outstanding issues.

Problem: It looks like 'core' tokens are not available. E.g. [node:title], [current-page:pager], and [site:name] are all unavailable

Detail: When trying to save/preview a custom content type called 'Event' I get a lot of token e ...

Score: 0
Alexey Uvarov avatar
Drupal 7 taxonomy term fields not handling content filters
au flag

Image Resize Filter doesn't work with taxonomy term description. Resizing works fine in nodes and blocks, but not in views for taxonomy term.

I'm loading term in my view template. And render its description(also tried custom) field.

$term = taxonomy_term_load($term_id);
print render($term->description);

I've tried to render with field_get_items and field_view_field.

Then i've figured out that html ...

Score: 0
Filter on PHP value
us flag

I created a PHP value for a view to calculate the number of days between two dates. These dates range from negative values (-303) to positive values (422). This field is referenced as $row->php.

I'm trying to filter on those PHP value field for all values greater than 0. I can't seem to get it to work.

This is the code I am using so far.

$value = $data->php['0']['raw']['value'];
$num = (int)$value ...
Score: 0
gMaximus avatar
How can I use $argument, in default value PHP, for a contextual filter?
sa flag

I'm using a entity reference field on some content types. The field references taxonomy terms. Then I'm using a view to filter the available options. I'm passing the content type to that view using this token - [node:content-type:machine-name].

Essentially the field is used on different content types but the value is the same on each content type.

So the field is called product type. Content type ...

Score: 0
Image field input renders with type text instead of file
om flag

(Drupal newb - please go easy and give references that help me learn how to debug stuff in Drupal myself, thank you!)

I've taken over a Drupal site with 7.80.

There's a type called Event which has a bunch of fields including an Image. There are many existing Events where Image upload presumably worked fine in the past. The images are visible when editing those Events.

Problem: The form for adding a new E ...

Score: 0
Adi avatar
Show pop-up form after every drag and drop
um flag
Adi

I'm working on functionality based on the Homebox module. Whenever a drag and drop operation is performed, I want to show a form in pop-up. Does anyone have experience with it?

Score: 1
Grayson Cooper avatar
Git branching strategies with a small team to develop a Drupal site
in flag

We're a small team (5-6 developers) building a Drupal 7 site. Previously, we've used Features (https://www.drupal.org/project/features) to export our configurations from development to production. We've relied largely on assigning developers discrete, unrelated tasks.

Our upcoming work has distinct, but related development. For example, I anticipate we'll need to add fields that will be used by two d ...

Score: 0
A new field doesn't show on the page
cn flag

I recovered a site from a backup which had run on Drupal 7.7. I upgraded it to Drupal 7.80 on another instance. Now, we need to add new fields to content types and add new nodes. I added a field as an administrator. I can't see the added field on either the old site or the new one.

What I have done so far:

  • I checked the node is published
  • I checked the permissions
  • I flushed the cache
  • I verified t ...
Score: 0
stoncu avatar
Views contextual display based on taxonomy for no value
cn flag

I have a content type that has a name field and a taxonomy field that contains cities. I want the view to display by default the city as title and the message "nobody lives in city X" for each of the cities, i.e. "Nobody lives in New York" before I create any content. Once I create a person and select New York, it should display "John lives in New York". I assume this involves contextual filters and may ...

Score: 0
Sharing articles on Social media loses the images after posting
pg flag

This seems to have only happened recently. Has anyone found a fix? I'm using D7 with Metatag, Metatag:Facebook & Metatag:Opengraph.

However, I'm not convinced the issue is with any of these modules, and here is why:

When I share an article on facebook (other platforms are doing the same), the image shows correctly in the preview but when it is displayed on a user's profile, either no image or a  ...

Score: 0
mts11 avatar
ckeditor not loading rich text editor by default
cn flag

I'm running CKEditor 7.x-1.19 with Drupal 7.80.

With "Default editor state" set to Enabled, and "Show the disable/enable rich text editor toggle" set to Show, my system is still loading the plain text window. I can then manually toggle to the rich text editor. I see this when creating new nodes or blocks, and also editing existing nodes and blocks - I think anywhere I'd expect the editor to load. ...