Questions tagged [7]

Version tag to tag issues specifically related to Drupal 7.x. Please note that version tags should be used only for questions that apply to a version only, not to merely say what version a site is using.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Can't print any field using entity_metadata_wrapper

I'm cloned an existing D7 site onto a new computer that I've worked on many times before, but I have a problem I've never seen before - I can't print ANY field using entity_metadata_wrapper. The ...
0
votes
0answers
17 views

Duplicate published content to another language

I have a big question without a solution, but I can't believe it doesn't exist. I have a site in Portuguese and one in Spanish, I want to pass the contents of "pt" to "es", how would I do it without ...
0
votes
2answers
31 views

Setting up an exposed filter to only filter conditionally

I am trying to build a D7 view, and I have the view correctly only showing results using a contextual filter, but I am trying to build one more filter (an exposed one), to drill down even more. I ...
0
votes
0answers
8 views

How to fix malformed geometries in geofield

I have a form that allows to add geometries to a node. It features a geofield map widget where you can also add geometries using a WKT field. Plenty of users have used this field. However, some of the ...
0
votes
0answers
11 views

Storage API + Services 3: How to work together?

I am trying to set up a site that will be storing a large amount of images. I am using Storage API module for that and It is working fine through web. Now I need a REST Service to upload images. I am ...
0
votes
0answers
10 views

How to show referenced products on the individual page view of a product

I use Page Manager to override the individual product display node. I use a panel to show the product. In each product variation the shop owner can reference multiple products via a custom-created ...
0
votes
1answer
19 views

Show active taxonomy term as title of product category view

Commerce kickstart comes with a view named Collection products that shows: a Collection of products (Product display). In the relationship's tab of this view there are 2 relationships: 1. Product ...
0
votes
0answers
22 views

Dynamically created elements trigger wrong submit handler post AJAX event

I've found that dynamically created submit handles will adopt the first declared submit function in a form after an AJAX event has been processed. Demo code: <?php function form_test_main_form($...
1
vote
1answer
25 views

Uncaught Error: Call to undefined function db_table_exists() [closed]

Does anyone have an idea of why I would get this error ? PHP Fatal error: Uncaught Error: Call to undefined function db_table_exists() I'm running a script from a working Drupal site, using bash ...
0
votes
1answer
57 views

Using a sweet alert with preventDefault()

I have an event on a form submit. I set preventDefault() to stop the form submitting then pop a sweetalert with a confirm callback. If they decide to go ahead is POSTS the form to Drupal. The issue ...
0
votes
1answer
29 views

How to remove Home title from the home page?

There are several posts on a similar question. Despite that, I couldn't find the best way to resolve it. Display Suite is installed but don't see option to turn off page title. Our home page content ...
0
votes
1answer
25 views

Views AJAX error when too many results returned per page? [closed]

I have a View that returns a complete list of all my site's users and their data. That being said, I have 1000 users. If my view returns 500/page, I'm able to view it successfully. However, if I want ...
0
votes
0answers
18 views

Node as field in content-type

I have one type of custom node called "Concerts", and another type called "Conductors". I would like to add a field to Concerts indicating which conductor led the concert. However, the field types I ...
0
votes
0answers
31 views

Getting white screen in Login /user and the page content

I was recently editing a website with Drupal 7 installed, and was integrating twitter feed. I created a block twitter_feed_block and assigned the block to the content section of the front page. It ...
0
votes
0answers
7 views

I want value from first dropdown to load second dropdown list

I want Dropdown list A's value to filter out the options of Dropdown list B and display the number of select list as number of options of B list with same list of options. I have written following, ...
0
votes
0answers
16 views

Programmatically set a field's value to -None

I have a content type, that has a field with say 10 discrete values. When just created, these values can be edited, deleted. If another content type has a field that references these values, then I ...
0
votes
1answer
11 views

Anonymous permissions with Nodeaccess

Content type: Webform Allowed grants: View, Edit Allowed roles: Anon, authorized, admin Go to the webform node eg. node/20 Click Grants tab Tick authenticated and admin users can View, anonymous is ...
0
votes
1answer
68 views

Views date exposed filter by year in checkboxes

I have date field. In views I want to add the a date exposed filter. This filter will only display year and we can select multiple years. Just like this I have checked the better exposed filter ...
0
votes
1answer
28 views

How do I move a https site to localhost?

I am moving a site from the live server where it has an SSL certificate and is accessed by HTTPS to my localhost. After moving the site over, I get an ERR_SSL_PROTOCOL_ERROR. I am uncertain of how ...
0
votes
0answers
13 views

Items removed from Node Reference field are still displaying on the node

This problem only very recently cropped up; I've never encountered it before. I have a content type (Resource) that contains a Node Reference field (pointing to Organization nodes) that allows ...
0
votes
0answers
29 views

Captcha not visible in login form

I enabled the Captcha module in drupal 7.It is not visible at user_loginand validation message is shown for not filling it. I tried inspecting it and none appeared. Math question field is required. ...
1
vote
1answer
37 views

How can I hide a field in the node add form but it unhide it on the node edit form?

I'm having a content type in that I want a field "Status" to be hidden in add content form page(I'm setting default value in that add content). Now I want that field to appear in edit form page of ...
0
votes
0answers
11 views

How can I allow only one flag per matching field value within a view?

I have a view that allows users to flag nodes directly through the view, I'd like to limit it so that can only flag one item per category at a time. For example: VIEW Category 1 Node A ...
0
votes
0answers
21 views

Issues removing a Block from content

I'm working on an old D7 site and have been asked to remove a Block from a particular page. First thing I tried was to go to the page in question, click the gear icon next to the block and select ...
0
votes
0answers
20 views

I want to override page.tpl.php to work for all pages or custom urls

If i override page.tpl.php to page--front.tpl.php which is working for only front page of site. But i want that overrided .tpl file should work for other urls as well. how can i create ? is there any ...
0
votes
1answer
16 views

Changing the html and order of system fields(pass/email/locale/etc) of user edit form

I have changed a number of forms accessible by users to fit a certain style. To do this I used an #after_build function that adds prefixes and suffixes to fields, as well as a bit of javascript. This ...
1
vote
0answers
17 views

How to mark related entities as dirty in search api module when edited?

I am using Drupal 7 with the search api. I understand that one of the 'common pitfalls' of the search api is 'Changes in related entities don't lead to re-indexing'. I am bringing in a field called '...
0
votes
0answers
13 views

Entity Translate won't show translations on template overrides

I have set up entity translate and it lets me add the translations so they are stored in the DB. But when I click on the translated page, all I see is the orginal language which is English. So I these ...
0
votes
0answers
27 views

When changing values in the database why does this not affect the view?

edit: How could i use Views bulk operations for the change of a field's value? Instead of directly editing mysql? I have a content type, f.e mycontentype, which has titles, like: Title - library1 ...
0
votes
0answers
37 views

Get field value in viewer.js file (from pdf.js)

I created PDF files protected with password. They are uploaded to Drupal and the password is saved in a field pdf_password in Drupal. I would like the PDF to open them with pdf.js without having to ...
0
votes
0answers
14 views

Delete a content type's allowed values, and all parent nodes should not show info regarding these values

I have a content type f.e. parts, with the following values: electrical, machine, glass, liquid or NONE I also have a content type, f.e. product, where with a view one can select which part the ...
0
votes
0answers
27 views

Undefined property $uid when running update.php

I have had a minor issue which has been popping up whenever I run update.php such as after updating some modules, etc. Anytime I run update.php I get the following error: Notice: Undefined ...
0
votes
0answers
12 views

Advanced forum search view ignores topics first post

Advanced forum module comes with the search view. It searches for a user inputted search term in forum topic content type and returns those topics that contains this term in its comments. The ...
0
votes
0answers
22 views

Help needed with ajax request from Jquery to callback function

I create the callback url 'swish_payment/request' in my hook_menu() function: function swish_payments_menu(){ $items['swish_payment/request'] = array( 'type' => MENU_CALLBACK, ...
1
vote
1answer
62 views

Add custom attribute to an external JS script

It's not really clear how to add custom attributes when adding an external JS script to the page. Currently I have this code: drupal_add_js('https://code.jquery.com/jquery-3.4.1.js', array('type' =&...
0
votes
1answer
22 views

How to show one variation of one product in a View Pane

I have a View Pane on my home page where I list all products that are in promotion. Each product variation that can be set to "show in promo banner 1" via a taxonomy term field with checkboxes. So the ...
0
votes
0answers
11 views

How to safely delete a node reference value

I have a field in a content type, content_type_A, whose field type is Node reference. It references another content type, content_type_B, which has a field which i cannot edit of type Node module ...
0
votes
1answer
31 views

How can I run a Views SQL query in PhpMyAdmin?

i go to admin/structure/views/settings, check Show information and statistics about the view during live preview and then Show the SQL query checkbox that will appear below. I have a field which is ...
0
votes
0answers
26 views

How can I change the value of the og:image meta tag?

I want to change the value of og:image property for below tag programmatically. <meta property="og:image" content="https://example.com/sites/default/hotelier_in/styles/themes/hotelierindia/logo....
0
votes
0answers
23 views

Wrong path of Image for property = “og:image” of meta tag in content view source

I have uploaded an image in my content. When I checked view source of the page, it shows the wrong image path for og:image property of meta tag. After uploading the image in my content, image path ...
0
votes
1answer
45 views

Hook form alter to check date field is empty or not

First of all I'm new to custom modules, I'm using hook_form_alter to do some custom validation, in the middle I have to check if a date field is empty or not, if empty I will display an error message. ...
3
votes
1answer
45 views

Where to programmatically enable a Feature module

I created a Drupal 7 feature and usually I would enable it with Drush, but someone suggested that I enable it with an update hook (which I assume means it gets enabled on updb or update.php). I saw ...
0
votes
0answers
16 views

Custom Search API sort logic

I have content (multiple content types) which are tagged by a taxonomy that indicates the geographical region they're relevant in. The content is indexed using Search API and Solr. Each user is also ...
0
votes
0answers
20 views

Drupal fieldinfo error message

I'm getting the following error messages when I edit or add content in Drupal 7.67 Notice: Undefined index: module in FieldInfo->prepareInstanceWidget() (line 591 of C:\xampp\htdocs\drupal\...
-1
votes
1answer
40 views

How run a view in MySQL

From a view, I get the following in the Auto preview Preview with contextual filters: SELECT node.nid AS nid, node.created AS node_created, node_field_data_field_title.title AS ...
0
votes
1answer
27 views

hook_menu() item never reached?

I have a module where hook_menu() was already used to process ajax calls, like this: function bizaudit_menu() { return [ 'bizaudit/ajax' => [ 'page callback' => '...
0
votes
1answer
17 views

Prevent login except from Services

I would like to prevent my users to login except for those who login through my REST Service. Is that possible?
0
votes
0answers
23 views

How index on solr nodes from a content type, that belong to a certain organic group

I am using Search API Solr and Search API modules In order to index a certain content type's fields. I also use organic groups. So I need to index only the nodes that belong to say organic group with ...
-2
votes
1answer
19 views

How to prevent cart from being emptied

In my Drupal 7 site I have inserted an extra page in the checkout process (using a custom module), after the review page, where the customer can choose between 2 custom payment methods. My problem is ...
0
votes
0answers
37 views

How to remove below part from top of XML?

i have created a view for XML feeds. But when I access the link for feeds it gives me below debug info at top of xml feeds: <!-- THEME DEBUG --> <!-- CALL: theme('views_view_views_rss') --&...