Questions tagged [drupal]

Drupal, a PHP-based open source Content Management System (CMS) framework, offers numerous advantages. However, it is highly recommended to post your queries directly on the esteemed platform of drupal instead of relying solely on this tag. Additionally, as major versions exhibit significant disparities, it is advisable to leverage specific tags such as drupal-6, drupal-7, or drupal-8 for enhanced accuracy and support.

Verify if currently authenticated in a different application

Running two different applications on my server - one using Apache for my main website and the other using Node.js for chat application. If a user opens the home page of the chat application in a new tab, how can I determine if the user is already logged ...

Combining the powers of Javascript and Drupal can create

My current setup includes an "open video" button and a form that triggers an ajax call to render files with the corresponding buttons when users click on handouts or videos. I have encountered a problem: Whenever I click on "open the video" after renderi ...

Retrieve the JSON data once the user has applied the filter

Is there a more efficient way to improve the performance of handling an extremely large JSON file with 5000 keys and 5 values each? Currently, I am using AngularJS with a backend in Drupal 7. Here is my view: <ul class="list-group border-0"> < ...

How to Implement Drupal.behaviors for Specific Pages?

Currently, I have a module that showcases an alert to users within a block. For those interested, you can find my code on GitHub here: https://github.com/kevinquillen/User-Alerts If you would like more information about the module and its functionality, ...

Encountering difficulties with submitting a drupal menu add form through Selenium

My quest to create a new menu in Drupal (8 URL: <site url>/admin/structure/menu/add) using the Python Selenium Chrome Webdriver has hit a roadblock - every time I attempt to submit the form, nothing seems to happen. I've explored various methods of ...

Drupal 7 FlexSlider - alignment issue with image placement

I am encountering an issue with the Flexslider module on my Drupal 7 website. I have created a simple slider that displays 3 photos. I enabled touch screen functionality for the slider, and everything seems to be working fine except for one problem - all t ...

Is there a way to transfer a MySQL table into a CSV document and retrieve it?

I'm attempting to export data to a CSV file from MySQL. I found the following script, but I am encountering an error with the $result variable: mysql_num_fields is indicating that the argument supplied is not valid. $filename = 'exported_data.cs ...

Executing a Drupal rule using JavaScript: A step-by-step guide

I'm facing a challenge when trying to activate a Drupal rule using JavaScript code. lowerLayer[image.feature_nid].on("dragend", function() { var position = kineticImage.getPosition(); var layerPosition = this.getPo ...

What is the most effective way to perform two GET requests in PHP?

Here's the code snippet I am currently working on: $header = [ 'phoneType' => $mobileType ]; Drupal::logger("cam")->debug('PageNameHere retrieveAPINameHere REQUEST: '.json_encode($header)); $filterPhone ...

By clicking the button, you can add an item to select2

Utilizing the select2 tag style in my Drupal YAML form allows users to easily locate and add various items. These items come with both images and titles on the same page, accompanied by a button next to each image. My goal is to enable users to click the b ...

Drupal encountering memory issues due to PHP/MySQL integration

Working within a local Drupal CMS environment has been smooth sailing so far, with easy navigation and page access for viewing or editing. However, an issue arises when attempting to save changes or delete pages, leading to one of two errors popping up. E ...

Pause the audio using jQuery when the slide changes

I have a Drupal website with a slider that includes an audio player on each slide. I need the audio to stop whenever the slide changes. The slider plugin I'm using is owlCarousel. Here is my current code: $("#owl-demo").owlCarousel({ afterAction: ...

Problem with Elysia Cron in Drupal 7: Invalid key causing Cron to fail

Our Drupal websites utilize Elysia Cron and have an external CRON tab set up to access the CRON URL at . Unfortunately, upon checking the logs, we encountered an error message stating: "Cron could not run because an invalid key was used". ...

dealing with the presentation of options in linked drop-down menus, within an HTML context

Firstly, I apologize for my poorly phrased question. In the process of building a location-based application with Drupal. I have implemented a form that allows users to select their location. The form includes three 'dependent' select elements (e.g., cou ...

Which CMS is better for creating a social network: Drupal or WordPress?

Creating a community for web-comic artists to synchronize their websites is my current project. The dilemma I am facing now is deciding between using Drupal or Wordpress as the CMS. Although Drupal is renowned for its Social Networking capabilities, I fo ...

Troubleshooting a problem with jQuery and Drupal behavior when the document is ready

Encountering a strange issue with my jQuery code within Drupal 7. I implemented the following snippet : (function ($) { Drupal.behaviors.exampleModule = { attach: myPopUpFunction..... })(jQuery); Interestingly, on Mac browsers, the popup loads af ...

utilizing session variables in php that are generated during an Ajax request

Hey there! I am facing an issue with accessing session variables after making an Ajax call in JavaScript to a PHP file. I am able to create a session and store values within it during the Ajax call, but when trying to access those session variables afterwa ...

Error in creating directory 'temporary://update-extraction/' in Drupal

As I attempt to install a module on my Drupal 7.37 version, an error message pops up: Unable to create directory 'temporary://update-extraction-9b760e0c/. I've already set the permissions of the ./path/to/tmp folder to 777 under Configuration->Media->F ...

Expanding a module contribution by including an additional field in the database submission

Currently, I have integrated the fivestar contributed module into my website pages. Additionally, I have developed a custom helper module that allows me to expand the functionalities of the fivestar module by incorporating a personalized widget. This was a ...

The Drupal configuration file cannot be found

Currently, I am in the process of setting up a new installation of Drupal on my Linux server and encountering an error message: Error Message: The settings file does not exist. The Drupal installer is prompting me to create a settings file during the inst ...

Eliminate repeated elements in a selection using an AngularJS custom directive

I am in the process of creating an events app that utilizes JSON data from Drupal to showcase events using AngularJS within a Drupal module. One of the keys in the JSON object is 'genre', which I'm utilizing in a select dropdown to allow users to filter ev ...

Exploring the relationship between Drupal and Ajax

I'm facing an issue with a custom module that creates a table with buttons, triggers an Ajax call to load a form in a div when clicked. The hook menu responsible for this function is /myapp/get_form. The problem arises when I try to save data from th ...

Displaying Form Results on the Same Page in Drupal: A Step-by-Step Guide

Is there a way to display the results of a form submission on the same page as the form itself? Here is the relevant hook_menu code: $items['admin/content/ncbi_subsites/paths'] = array( 'title' => 'Paths', 'description' => 'Path ...

The variable "drupalSettings" is not defined and is causing an error "no-undef"

I am working on a single page app that needs to run within every Drupal node of a specific content type. This app is built using React and Yarn. Within my index.js file, I have the following code snippet: if(window.location.href !== 'http://localho ...

When attempting to use jQuery to click on a button that triggers an ajax callback, the functionality does not

I am facing an issue with my Drupal website. I have created a form with a button that has an ajax callback. The callback works perfectly, but now I want to execute a small JavaScript function when the user clicks on the submit button. Instead of creating ...

Utilizing AngularJS with Drupal for a dynamic base URL

I have created 2 Angular apps within Drupal 7: "example.com", "example.com/app1", "example.com/app2". "example.com" is my main site. However, when I enable HTML5 pushstate to remove the hash in the Angular apps, I receive a nobase error from AngularJS bec ...

What is the best way to transfer JavaScript variable values to Drupal PHP variables?

I need assistance with passing a JavaScript variable to a Drupal PHP variable and displaying its value. Here is the code I currently have: $form['title'] = array( '#type' => 'select', '#title' => t('titles'), '#page callback' => 'drupal_get ...

Responsive menu not collapsing properly and appearing funky in Drupal

I've managed to create a responsive navigation bar, but I'm encountering two issues. Firstly, when I resize the screen on my test pages, not all of the links hide as expected. Secondly, after inserting the code into Drupal, the nested links appea ...

CSS - Customizing the appearance of consecutive child divs

I'm struggling with adjusting the margin between two child divs when they follow each other. The current margin is set at 3rem, but I want it to be 1rem if both child containers have the class "narrow": Is there a way to achieve this without changing ...

What is the reason for multiple ajax functions being triggered when submitting a form through ajax?

I have a Drupal form with an AJAX submit. Additionally, I have another jQuery $.get function that sends a request every 2 minutes and inserts the response into an HTML element. The form and this JavaScript code are independent of each other, performing sep ...

Incorporating Activity into YUI Rich Text Editor

I'm having trouble adding a keypress event to the YUI rich text editor for Drupal. I've been attempting to use jQuery, but so far, I haven't had any success. ...

Using Drupal 8 with Nginx as a reverse proxy in a subdirectory configuration

Our web server is currently running Drupal 8 on nginx + php-fpm. We are looking to implement a reverse proxy server to make the D8 website accessible at www.somedomain.com/drupal8 The nginx configuration is functioning correctly: location /article_dev/ { ...

I am unsure whether Django or Drupal would be the best fit for my requirements

My interest lies in mastering either Drupal or Django to create dynamic websites with medium databases, multi-level users, PayPal integration, content management, fast development speed, and security features. I have a preference for MVC, ORM, and object-o ...

Resolve the 'undefined offset error' in Drupal Views Nivo Slider

After updating to the latest version of Drupal, I encountered an error while trying to use the "Views Nivo Slider" module. I keep seeing this error message: Notice: Undefined offset: 0 in template_preprocess_views_nivo_slider_view_nivo_sliderfields() (lin ...

Switch Image to Background Image on Mobile Devices

I am currently working on a website that needs a special page for an upcoming event. Typically, the pages on this site have a mast banner image that stretches across the full width of the page. However, for this particular page, it is necessary for the ima ...

Retrieve all tag values from the field and store them in an array

UPDATE : I require obtaining all values in the tags field! MY Query : $query = db_select('node', 'node'); $query->fields('tagsdata',array('name')); $query->fields('node', array('nid')); $query->leftJoin('field_data_field_tags', 'tags', 'tags.en ...

The CSRF token is being rejected by the Drupal services/cors API

Currently, I am utilizing polymer to facilitate ajax requests to my Drupal services api. After sending a POST request to login and receiving a token in return, I proceed to send another POST request to create a node. Despite successfully passing the token ...

How can we stop the anchor jump caused by a third-party script?

I'm currently utilizing a third-party script (details provided below) to divide a form into multiple ajax'd pages. However, when I attempt to move on to the next page, it immediately jumps to an anchor at the top of the form. This behavior is unn ...

Displaying Alert with PHP Query

I have recently set up my Drupal website and I am currently in the process of integrating an API from a control panel. One of the requirements of the API is to define a logout link mywebsite.com/logout that informs the user about their successful logout. ...

Drupal: Having difficulties with the "Send email" action to notify the commenter via email

After successfully setting up email notifications for new comments on my client's blog, I decided to also send a thank-you email to the comment poster. Using triggers and actions detailed here, I added [comment:author:mail] in the "Recipient" field as inst ...