FAQ Database Discussion Community


I want to join 2 arrays with a standard usable

php,arrays,drupal,drupal-7,array-merge
I have array1 array1( 'orange' => 'orange' 'banana' => 'banana' ); and array2 array2( 0 => 'apple' 1 => 'watermellon' 2 => 'orange' 3 => 'potatoes' 4 => 'lemon' 5 => 'banana' ) and i want to take as reply array3( 2 => 'orange' 5 => 'banana' ) I need...

How can I create a angular app that can subscribe to push notifications from a drupal CMS?

android,ios,angularjs,drupal,push
I'm using phonegap and angular to develop the native app. There are no user accounts. This is using local storage on the phone only. The app lets you subscribe to several different push notifications. The admin server that sends out these push notifications is a drupal site. Is a third...

How could i use a watchdog hook?

drupal,drupal-7,watchdog
I do not understand how i can use the hook_watchdog from the drupal site could anyone help me to find out how it works? I want to get the messages from the watchdog table. What is the main use of this hook?

can someone pls help me to find out opensource drupal themes which has user login options and file upload

drupal,plugins,content-management-system,themes,drupal-modules
i have browsed through a few themes but culdnt find any.can someone pls help to find out drupal themes which has user login options , am trying to build a site where users can have their own account and upload their files whenever they want. is it possible to use...

Whats the correct way of outputting html in a custom module in Drupal

php,drupal,drupal-7,drupal-modules,drupal-views
I have worked on a few project with drupal, and the main suggestion I got when learning was to use Views to output your data, although this was fine for some items I found it cumbersome to achieve my projects requirements in the set time and to style it the...

Static Comments on Drupal Node

drupal,drupal-7,comments,drupal-modules
I have a basic Drupal instance installed on my local server. One of the requirements I have is that users should be able to post comments on a node/article using static options given to them. For e.g., if a user opens an article, in the comment section, rather then showing...

Drupal - Highlight table row depending on variable

css,twitter-bootstrap,table,drupal,drupal-7
I have a custom drupal module and I'm creating a table using theme 'table'. $header = array(); $header[] = array("data" => "Home Team"); $header[] = array("data" => "Away Team"); $row = array(); foreach ($node as $game) { $row = [$hometeam), $awayteam)]; $rows[] = $row; } $table = theme('table', array('header' =>...

Pass variables from one page to a webform in drupal

php,drupal,webforms
I'm trying to pass one variable from different product pages to a webform page. Each product page has a session variable like $_SESSION["product_name"] = "Product1";. Similarly, other product pages have $_SESSION["product_name"] = "Product2"; $_SESSION["product_name"] = "Product3"; My question is how to pass these variables to a different webform page. I'm...

Nginx. Something like drupal in root and Magento in subfolder

magento,drupal,nginx,rewrite,subfolder
In root directory I have Drupal. In sub directory I have Magento. Most probably drupal rewrites overlap magento rewrites. Magento homepage opening successfully without any nginx config, but links don't work. I'm not sure, but I think to resolve the problem I need exclude magento directory from drupal routing. And...

how to limit view to just show each type one time?

drupal,view,drupal-7,content-type
I have a content type what is news, the news has a field type that is List (text) to keep different types of news. for example I have Health, Sport, Economic and etc. So now I am going to create a block and have each of these type in that...

Why my Drupal is intermittently slow? Stracing shows a lot of repeated sendto calls

php,performance,drupal
One of the Drupal sites I manage occasionally loads very slowly. If I strace PHP-FPM while this happens, I see a lot of poll/recvfrom/sendto system calls with what appears to be the same content: [pid 27381] recvfrom(5, "\7\0\0\1\0\1\0\2\0\0\0", 24589, MSG_DONTWAIT, NULL, NULL) = 11 [pid 27381] sendto(5, "\207\2\0\0\3INSERT INTO menu_router\n...

How to delete the items that i used from the database

php,database,drupal,drupal-7
I have this code below and what i want is when one of the item is used after the loop i want to delete this item from the database.... $query = db_select('watchdog', 'th') ->extend('PagerDefault') ->orderBy('wid') ->fields('th', array('variables', 'type', 'severity', 'message', 'wid')) ->limit(2000); // Fetch the result set. $result = $query...

Apache Solr Exception

php,apache,search,drupal,solr
Hello I am trying to run Solr on a Tomcat and have an exception like org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: directory '/var/lib/solr/data/index' does not exist Maybe anyone has some trouble like I do?...

Drupal7 | Custom Module | How to Display Template?

drupal,module,drupal-7,drupal-modules,drupal-theming
I'm having trouble figuring out how to display a template that lives inside of my custom module. This is what I have: <?php function brl_footer_theme($existing, $type, $theme, $path) { $theme = array(); $theme['brl_footer'] = array( 'render element' => 'content', 'template' => 'brl-footer', 'path' => drupal_get_path('module', 'brl_footer'), ); return $theme; }...

Macports switch PHP CLI version

php,bash,drupal,terminal,macports
I'm trying to switch my Terminal PHP version to 5.4 because I ran into some issues with Drush while updating my Drupal core. http://drupal.stackexchange.com/questions/112090/drush-command-errors The reason for these issues is my Terminal PHP version is different then my localhost. php -v in Terminal returns PHP 5.5.13 (cli) but my localhost...

sub-pages in drupal 7

drupal,drupal-7,drupal-modules,drupal-views
I am trying to develop a university website, Here the pland in the homepage: University of paris:   -> Faculty of Science -> Faculty of Economics -> Faculty of letter I want to have a common menu that repeats throughout the faculties example: in my site there is a 3...

Pass all the values of a database table without limit()

php,mysql,database,drupal,drupal-7
If i run this code it passes only 6 values of the database. // Begin building the query. $query = db_select('watchdog', 'th') ->extend('PagerDefault') ->orderBy('wid') ->fields('th', array('variables', 'type', 'severity', 'message', 'wid')); // Fetch the result set. $result = $query -> execute(); I know that if i put limit() in my code...

Use the value of “Database log messages to keep” that user select

drupal,drupal-7
How i can select the number that the user select on path: admin/config/development/logging and i want the number under Database log messages to keep I want to take this value.

Drupal 7 - add already existing block to LOGIN page

drupal,drupal-7
I'm creating a website using Drupal 7. I want to add a very simple block that I have already created to the right sidebar of the login page. This block contains only HTML formatted text. The URL for my login page is www.websitename/user/login/. I have selected the radio button to...

How I could create a db with the messages that are saved in admin/reports/dblog?

database,drupal,watchdog
I want to create a table in the db with the column message and with values from column message on admin/reports/dblog...Could someone help me? Or take the message from the db but in db the messages are with separated variables :/

Drupal 7 File Field Library

drupal,upload,drupal-7,drupal-modules
I'm trying to add a field of 'file' type that includes not only an upload button, but also a 'browse' or 'library' button that would show a list of already uploaded files. This would prevent having to upload duplicates if they are reused across the site. I've tried both iterations...

Drupal 7: Add text to default '/user' page

drupal,drupal-7,drupal-theming,drupal-templates
The default /user page is tabbed with one tab being for 'Create new account' and the other being for 'Log in'. I don't need to change this a ton. I just want to add some text above the tabs. However I can't seem to find the template that controls this...

What is the point of phonegap-build/PushPlugin? Doesn't the device OS handle receipt from GCM/APNs?

cordova,drupal,android-gcm,push,apn
What is the point of phonegap-build/PushPlugin? Doesn't the device OS handle receipt from GCM/APNs? I'm looking to use Drupal w/Push-Notifications Module to handle storing ids and forming requests to the GCM/APNs servers....

How to manage Facebook connect in Drupal multisite?

php,facebook,drupal,drupal-7
I have a Drupal multisite installation. It is not a common multisite installation. Long story short: I have one single database, one single setting.php and the change of theme is managed according to the site domain by the module ThemeKey. The drupal installation makes two sites working with different themes...

Is there a rest api for the drupal admin interface (e.g. for clearing the cache)

drupal,drupal-7,drupal-modules
I'm using cloud based continuous integration to deploy my theme to my drupal site, and I would like to be able to automate the clearing of the cache after the theme files are copied in place. Is there a way of doing this remotely? I'm thinking it would be great...

How can i hide list entries based on user roles Drupal 7

drupal,drupal-7
I'm quite new to Drupal, i setup node pages and assigned edit permission to various roles. Within the edit options i have a select list field with dropdown options red green blue yellow What i'm looking at is to restrict each role from viewing items within a dropdown list. Example:...

Rewrite Drupal product title select list

php,drupal
I run a popular Drupal website that caters for the clubbing market. I retail events on my site using Drupal Commerce To create an event(product) I have set up these fields : Event Title Event Date Event Price When creating events, each event is a separate product with a different...

How to add / update a field collection without updating parent node/entity drupal 7

drupal,drupal-7
I needed to to add / update field collections to node entities without updating the node entities. I tried two ways listed in https://www.drupal.org/node/1842304 and http://alexrayu.com/blog/saveupdate-field-collection-without-nodesave but none of them seems to be working exactly the way I want. I tried as follows: $node = node_load($nid); $field_collection_item = entity_create('field_collection_item', array('field_name'...

What is the significance of CONFRIMATION page in DRUPAL?

drupal
This is one of the same page which gets displayed whenever we try deleting (it gets displayed on various other events as well) bunch of nodes from the CONTENT page.

How i can avoid the distinct() of watchdog?

mysql,database,drupal,drupal-7
I want to avoid using distinct() in my code. I want some help in order to create a table that will keep the values that are taken from the db table watchdog and check if the next value has been taken. If the next value is in the table this...

Installing Drupal - missing extension 'gd'

php,drupal,drupal-7,php-extension
I'm attempting to install Drupal on an Windows / Apache / PHP box. When running the install script 'install.php' I'm told that the extension gd is not installed. My PHP ini file has it enabled: ... ;extension=php_curl.dll ;extension=php_fileinfo.dll extension=php_gd2.dll ;extension=php_gettext.dll ;extension=php_gmp.dll ... I have restarted the server. Looking inside the...

Drupal to Liferay Migration

drupal,migration,liferay
I want to migrate my existing Drupal sitea (about 600 pages) to Liferay. What will be the bestway? Do I perform DB to DB Migration? If yes, how it can be done? Is there any solution provider who is giving this service?...

Writing php code to creating menu in block show and alert

php,drupal,drupal-7,block
I have a menu in a block and this is my code in that block that is in sidebar second: <?php $url=$base_url.'/drupal'; echo '<ul> <li><a href="'.$url.'/article/1">One</a></li> <li> <a href="'.$url.'/article/2">Two</a></li> </ul>'; ?> it is working correctly, but return and red alert: Notice: Undefined variable: base_url in eval() (line 2 of C:\xampp\htdocs\drupal\modules\php\php.module(80)...

With join what must be the fields in order to take all the values?

php,mysql,sql,drupal,drupal-7
$query = db_select('watchdog', 'wa'); $query->leftJoin('malgona', 'm', 'm.wid = wa.wid') ->fields('m'); If I put in fields m I only take the values of m and if I put wa I only take the values of wa. What must be the fields value in order to take the join (with values...

Android How receive Push notification by using drupal server

android,drupal,drupal-7,notifications
I follow all the steps as tutorial. tutorial android Push notification Drupal Server side work link My device is successfully register on drupal server by using GCM Id. My problem is that , from server when sending push notification it shows 'Successfully send notification' , but this notification is not...

Is there the equivalent of the WP plugin Types for Drupal 7?

drupal,drupal-7
So I have a Drupal 7 client who needs to have a dynamic content type... name, description, 3 images We will show these "objects" (for lack of a better word) in a filterable grid. Also, the client needs to be able to add, update and delete these on their own....

Drupal images wont show after moving to another server

php,image,drupal,server
When i moved to another server, the drupal images that are in /sites/default/files wont show, the folder has 755 permisions (tried 777 too) the path is correct in file system, when edit the block and reselect the image from server it shows perfectly when the image is not showing the...

Allow only certain roles access to custom module in Drupal

php,drupal,drupal-7
I am having trouble getting this working correctly. I have created an order form module for Drupal and I need to control access to it. I noticed that this order form was accessible without being logged in if I browse directly to http://example.com/orders/order-form I have been looking around and I...

How can I filter by “updated this month” in a view?

drupal,drupal-7,drupal-views
I have a view filled with content of stuff that needs to be done every month. I already have it set up to show everything that fits that parameter, I have one more thing i want it to filter by: I want it to be able to show only things...

Drupal7 modified user login no effect?

php,templates,drupal,login
I am new to Drupal. I am trying to create a modified login page. I have modified the template.php of my theme with the name "cmse" in /sites/all/themes/cmse/ This is my template.php: <?php function cmse_preprocess_html(&$vars) { $vars['classes_array'][] = 'homepage'; $vars['classes_array'][] = 'teaser'; } function cmse_theme() { $items = array(); //...

Get all metadata with cmis query in nuxeo

drupal,cmis,nuxeo
I'm using the drupal cmis api and a cmis query SELECT+*+FROM+cmis:document+where+CONTAINS("blabla") to get document from my Nuxeo CAP version: 6.0` but when i get the result, i get the "Common metadata" but the "Metadata" are not send,and also for some of doc i have the correct dc:language but for others...

Styles in Drupal menu

css,drupal,menu,drupal-7
I need to put styles in a Drupal Menu. I have this code: print theme('links', array('links' => menu_navigation_links($menu_area), 'attributes' => array('class'=> array('nav', 'navbar-nav')) )); The < ul > have the "nav navbar-nav" style but the < li > have a custom CSS style (menu-7053 first) that I can't touch. Is...

Page pagination issue in Drupal website

forms,search,drupal,pagination
I have an issue in drupal website ( http://www.perfectchoice.ae/properties-browse/ ) when I go to click on 2nd page number then no property comes there. I don't have knowledge about Drupal. Looking for someone to help me please. ...

Drupal - Custom page with arguments

php,templates,drupal,drupal-7,arguments
I am looking to hook every URL that starts with /questions to one template file. So for example: /questions /questions/question1 /questions/question1/respond /questions/question1/somethingelse all of the above should go to my template questions.tpl.php Then within my questions.tpl.php I want to do stuff with the arguments. Is there a way to do...

Why content appears misplaced?

drupal,drupal-7,drupal-modules
I am building a custom module which should display a calendar created by a third-part library. So far, so good. The only problem is, the calendar appears on top of page, even above header. It does not seems to be css-related. This is the way it looks: This is my...

php if, and, or : multiple variables to check. Working, but getting variable not defined errors

php,if-statement,drupal
Basically I'm trying to check if any variable exists, if so, then run the snippet regardless if the others exist or not. I'm using: if ($a1 || $a2 || $a3 || $a4): $a = "success"; endif; If only $a4 exists, this works and set's the $a variable fine. However, I'm...

db_select send me all the values and not what i want(Updated)

php,mysql,database,drupal,drupal-7
what i want is to check if variables = variables AND timestamp > timestamp and if this are true delete the old value and create the new i think the above code just create all the values as it do not deletes the old one. How i can delete the...

How to do a browser login by web service to Drupal website?

php,html,web-services,drupal,drupal-7
Having a web service, realized through Service module, how do i login my browser to my drupal website? I'm pretty sure i'm not getting the point, so i try to explain my issue. I need to set up a pc to read qr code from its webcam and reading the...

i have an issue with cURL in 2 sites

php,curl,drupal,module,libcurl
I have 2 drupal sites installed in different machines..On the first one,on status report in the list I have: cURL cURL library Enabled only that row with cURL...On the second drupal site, I have that: cURL cURL library Enabled cURL Enabled On the second file my module uses the cURL...

Custom Drupal bootstrap using file-API

drupal,drupal-7,bootstrap,drupal-file-api
i am using a single php-file Drupal bootstrap to generate a standalone cronjob PHP file. Here is my setup (the file resists in a subfolder, thats why i have to build up the base path like this) /** * Drupal bootstrap */ $path = str_replace("sites/all/modules/custom/my_module/cron", "", DIRNAME(__FILE__)); define('DRUPAL_ROOT', $path); require_once...

CSS link properties when pointing to the currently active page

css,twitter-bootstrap,drupal
Using bootstrap 3 on a drupal site, how can I change the color and weight of links pointing to the currently active page? I tried using a:active but that does not do what I was expecting.

How to repopulate the form data after form validation error in opencart?

drupal,yii,opencart
I have the following code public function insert() { $template="information/news_form.tpl"; //Loading the template file for the insert page $this->template = ''.$template.''; $this->language->load('information/news'); // Calling language file $this->load->model('information/news'); // Calling model file $this->document->setTitle($this->language->get('heading_title')); $this->data['breadcrumbs'] = array(); // Home link $this->data['breadcrumbs'][] = array( 'text' =>...

ng-model with complex nested json object and arrays

angularjs,drupal
Here's my scope: $scope.form_state = { values: { title: 'Hello', body: { und: [ { value: 'World' } ] } } }; Here's my view: <input type="text" ng-model="form_state.values['title']" /> <textarea ng-model="form_state.values['body']"></textarea> Hello is rendered properly in the text field, and [object Object] is rendered in the text area, which means...

Drupal-7 website is very very slow

drupal,drupal-7
I am new to Drupal. My website is loading very slow. Can someone help me out with this website? I am trying different answers available on SO however no luck so far.

Drupal Search API Solr - Long strings

string,search,drupal,solr,full-text-search
I am using Search API Solr (Solr v4.9.0) for my Drupal Search. A customer just informed us that they found out that Solr does not show search results for strings that are longer then 15 characters. The weired thing is, that we also use Search API Autocomplete in this project...

Convert a currency string to a number Drupal Views / PHP

php,drupal,drupal-7,views,drupal-views
I am feeding a field from a CiviCRM (MySQL) database into a Drupal View of a currency: € 350.00 How can I get this currency / string into number format to perform maths on it? I've tried removing that field from the display and feeding it into a Global Maths...

API to return newest version number of WordPress, Magento CE, Drupal available?

php,wordpress,api,magento,drupal
I'm wondering if anyone knows of an API I can use to programmatically return the newest stable/publically available core version number of common web platforms like Wordpress, Magento CE, and Drupal. For instance, as of asking this question, said API might return Wordpress 4.2.1 and Magento 1.9.1.1, etc I've read...

Removing HTML arrows from homepage

html,css,css3,drupal,drupal-7
Some odd arrows are appearing on my site, you can see them above the heading tag below: I've tried using Chromes developer tools to find what class/id they are but can't locate them? You can see them below the fold at: https://www.workbooks.com/ How can I remove these for good!?...

Drupal access control to custom user profile page

php,drupal,drupal-7
I am trying to add a new tab to a Drupal 7 user profile. Unfortunately, I can't find the right access argument to let the user view the page, but restrict him to view other users' pages by changing the userid in the url. Currently the admin can access it...

How to make link to comment form drupal?

php,html,drupal,hyperlink,drupal-6
I need to make custom link to a comment form in drupal like so: <a href="http://mypage/comment/reply/NID#comment-form">Reply</a> How to get node NID?...

Android Push notification using Drupal HTTP Post error “Access denied for user anonymous”

android,drupal,drupal-7,push-notification
When I'm trying to register user on host url generated by drupal module it throws an error: "Access denied for user anonymous" I'm sending Parameters token=Reg id generated from GCM Google type=android Please any one help me to solve this ......

I want to search the keys of an array inside my DB

php,arrays,database,drupal
I have an array in PHP: $my_array = array( [6] => blabla6 [3] => blabla3 [7] => blabla7 ); $query = db_select('dog', 'dg') ->fields('dg') ->condition('numbers', array_keys($my_array), 'WHERE IN'); I want to get all the rows that have numbers = "key of the my_array" and I have no idea how do...

Can I use the Backup and Migrate module to back up Drupal 6 and restore in Drupal 7?

drupal,drupal-7,drupal-6,drupal-modules
I'm new to the Drupal environment and I'm looking to upgrade a website from Drupal 6 to Drupal 7. I would like to know if I am able to use Backup and Migrate module to back up Drupal 6 and restore in Drupal 7? If not, I'm aware of Migrate...

How to make a Drupal theme with PhpStorm

drupal,drupal-7,phpstorm,drupal-theming
I want to make my own custom theme with PhpStorm. I found lots of information how to create your own module, but nothing for theme with this IDE. For creating a module you should open a PhpStorm, to choose from "Project Type" -> "Drupal Module", to add some additional settings...

How to remove second library of jquery loading with Drupal installation

javascript,jquery,drupal,drupal-7
Question: Can someone tell me why a second version of jQuery appears to be loading with my Drupal installation? And how do I remove it? Repro: If you view the source code of the NOVA home page you will notice 3 JS files in the header. The first one is...

Moving a SIte from Drupal to Raw PHP … Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

php,mysql,sockets,drupal,drupal-7
I don't understand this the error, Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) I am not familiar with drupal or any frameworks. Please advice me about this error and if I want to host my raw php site which I created in local WAMP server and...

Drupal 8 Stylesheet Won't Render

css,drupal,libraries,beta,drupal-8
I'm trying to make a Drupal 8 theme and no matter what I do, the stylesheet I have won't render. Here's my libraries.yml file: global-styling: version: VERSION css: theme: css/layout.css: {} and here's my info.yml file: name: My Test Blog type: theme description: 'My test theme description' package: Custom core:...

Delete the values with the oldest timestamp

php,mysql,drupal,drupal-7,cron
I want when cron runs to delete the oldest values of timestamp and in same time create the new one. I have this code for cron. Here select all the values from watchdog: function error_cron() { // Begin building the query. $query = db_select('watchdog', 'th') ->extend('PagerDefault') ->orderBy('wid') ->fields('th', array('variables', 'type',...

Custom Drupal-8 module doesn't appear

php,symfony2,drupal,drupal-modules,drupal-8
I have successfully installed my own module on Drupal8 site. I tried to access it by entering path specified in routing.yml file but I'm getting 'Page not Found' error. I'm almost sure that my module is written correctly(I was following a tutorial where the same module where accessed successfully). What...

Drupal Content Types in Liferay

drupal,liferay
What is the equivalent concept of drupal content type in liferay. I want to migrate some drupal content types in my Liferay site...

How i can separate a sentence in php? [closed]

php,drupal,drupal-7
I have a sentence with [1234]-blablabla and i want to keep only the number 1234. Could someone tell how could I achieve this thing?

Drupal domain access auto create content

drupal,drupal-7
I am using Drupal's domain access module to create micro sites in a white label system. Is there a way of automatically creating nodes with default content for each site?

Why isn't my autocomplete.js textfield responding to input (Drupal 7)?

drupal,autocomplete,drupal-7
I am trying to get auto complete to work for a text field in my Drupal installation. This is a large project, and I'm not yet familiar with Drupal and this large codebase. Please assume that I can make the simplest of mistakes. Okay, so I've been following the simple...

Use Drupal search to search Q2A and PHPBB content

php,html,drupal,phpbb,question2answer
Q2A and PHPBB are 2 branches of my main website. In other words.. website.com/q2a and website.com/phpbb ... When I use the login box on any of the 3 branches, I want the SSO to log me in to all 3 branches. When I use the search box on any of...

Drupal: taxonomy filter from separate view

drupal,drupal-7,drupal-views,drupal-taxonomy
this is my first website in Drupal 7, I'm trying to learn this framework, but I'm encountering a problem to which I could not find a solution yet. I'm trying to create a page with a panel that has 2 views (as seen in this photo), the left view contains...

jQuery Uncaught TypeError: Cannot read property 'msie' of undefined in drupal

jquery,drupal
I'm facing following error on my Drupal Website: caught TypeError: Cannot read property 'version' of undefined jquery.formalize.js?nkmwqx:13 Uncaught TypeError: Cannot read property 'msie' of undefined caught TypeError: Cannot read property 'version' of undefined jquery.formalize.js?nkmwqx:13 Uncaught TypeError: Cannot read property 'msie' of undefined jquery.bgiframe.min.js?v=2.1:11 Uncaught TypeError: Cannot read property 'msie' of...

Drupal views: list referenced nodes except the one used as contextual filter

drupal,drupal-views
i have the following case: I am building a website that has information on filmmakers and their films. I have a node type for the filmmaker, with biographical content, etc and another one for the films, with a field 'author' that references one or more of the filmmakers (since one...

How to list all child pages of current parent page in drupal 7?

drupal,drupal-7,teaser
Suppose I have parent pages A1 and B1. A1 has child pages A1.1, A1.2,A1.3 and B1 has child pages B1.1, B1.2. I want to list all the respective child pages on A1 and B1. In every child page I have an image and a title. These 2 information needs to...

Drupal site issue with pass by reference

php,drupal,drupal-modules
PHP Fatal error: Call-time pass-by-reference has been removed in /XXX/modules/XXXX/XXXX.module on line 227 The site was working perfectly on my machine. Suddenly after few days I started getting this above error without any code change. By going through the log files I got the above error. So I changed...

Drupal 7 uuid.module Database update 7103 fails

drupal,drupal-7
I finished upgrading a Drupal 6 site to Drupal 7. All fields have been migrated. When I run update now I get this UUID error An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://drupal220/update.php? op=selection&token=bLDFFBM8NZi09U0is5p6eim_do1vePHV5iNjLWLu8u4&id=10&op=do StatusText: OK ResponseText: Fatal error: Cannot access empty property in...

Join DB tables on Drupal

php,mysql,database,drupal,drupal-7
i have a watchdog table and i create a distinct table which i have the unique variables from watchdog with their wids as key. What i want is to join the 2 tables (distinct and watchdog) in order to join all the values with unique variables. i did this: $query...

Aligning form fields using CSS

css,forms,drupal,alignment,inline
I have an advanced search form (click "Advanced search") here in Dupal 7 - http://www.ibuild.ph/mtf-rdp-minimal/search/node and contact form here - http://www.ibuild.ph/mtf-rdp-minimal/contact. The search fields are inline, while the contact fields are positioned below the labels. Is there a way to inline position the fields with the text labels and make...

Updating remote site with drush and ssh

php,drupal,drush
I'm very new to drush. We have a git repo of a drupal site that I would like to push to the remote server using drush. I can easily scp the drupal files or setup a cron on the remote that runs git pull but I still would like to...

How do I setup Apache to serve multipe local sites at different locations?

php,apache,.htaccess,drupal,drupal-7
I'm trying to setup multiple local Drupal 7 site installations on my local machine. Right now, I have a folder ~/Sites/drupal/7/{{various_drupal_sites}} I'm looking to be able to access any of these sites at site1.drupal.local, site2.drupal.local, etc. The problem is that I'm getting a 403 permission denied both at drupal.local and...

Drupal AJAX HTTP error occurred During Installation

mysql,drupal,drupal-7,drupal-ajax,drupal-commons
I am trying to install Drupal using IIS 7 on Windows and it gets pretty far in the installation before it fails with the below error message. I always end up having to go back into Windows Services and start the MySQL service back up because it stopped when this...

Working with Drupal site collaboratively

drupal,drupal-7
I'm starting to help on the development of a Drupal based site and I got the files for the site on a zipped folder. I can import the files into Acquia Desktop and it gives me no error and runs the server. However, when I go to the site, it...

insert values to a table from watchdog

php,mysql,database,drupal,drupal-7
I have a custom module which when installed it creates a table with blablabla name and uid,timestamp as fields. Now what i really want is when cron runs to get the values(uid, timestamp) from the watchdog table and pass it to my blablabla table. Is there a method to do...

Drupal 7 DB API Query with Condition db_or etc

mysql,drupal,drupal-7
I'm having a little issue with getting an sql query to work in drupal 7. Basically, I'd like to know if my drupal code for the db_api is correct for the SQL query that I expect it to generate. Please see code below: /* SQL Query Note: The the 'a'...

drush failing with autoload.php failed to open stream

php,drupal,composer-php
I searched the whole drupal directory but I didn't find the autoload.php file. I see the error when enabling modules using drush on the command line. Here is the exact error include(sites/all/modules/contrib/guzzle/vendor/autoload.php): failed to open stream: No such file or directory composer_autoload.module:24 [warning] include(): Failed opening 'sites/all/modules/contrib/guzzle/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear')...

Drupal IP/domain redirect

redirect,drupal
I recently redid a client's old Drupal site, in Apostrophe, and pointed their domain to the new server. I am now trying to access the old site via IP address, but there seems to be a redirect configured to rewrite the base IP address to the domain name (72.xx.xxx.xxx to...

How to traverse the Drupal's watchdog table?

php,drupal,foreach,drupal-7,watchdog
I want to get all the error messages from the watchdog table, but when I get the message column from the table it has %path, %function, !message something like this messages how i can take the whole real message with not this signals? <?php // Begin building the query. $query...

Integrating Windows Authentication with ASP.NET and Drupal In External Portal

asp.net,drupal,single-sign-on,asp.net-identity,windows-authentication
We are in the final stages of developing a portal application, built in ASP.NET MVC, for a large organization with many subsidiaries. The portal will be used by both internal, meaning employees of the organization, and external users. The portal also has an accompanying informational CMS that is being developed...

Drupal - Query to count all nodes of content_type “A” in which field_b is “X”

sql,drupal,drupal-7,entityreference
I need to make a query for a drupal site. Initially I just needed to COUNT the number of nodes for a content type: $query = "SELECT COUNT(*) amount FROM {node} n WHERE n.type ='A'"; $result = db_query($query)->fetch(); return $result->amount; Now I need that but only for nodes that have...

Check if the entry in DB exists - Drupal 7

php,mysql,database,drupal,drupal-7
I have made a module that when cron run it gets the wid and variables and timestamp from the watchdog table and pass it in a new table blablabla. I want if a value with same variables exists in the blablabla table do not pass this value. Here follow my...

How do i combine multiple fields from a view into one hyperlink?

drupal,drupal-7,drupal-modules,drupal-views
Im sorta stuck on an issue. I have one view where i am displaying 5 fields under an image. These fields are all clickable links or I have explicitly declared them as links.The problem: I need to combine each field/link into one link. I tried the "Combine Filter" but when...

Copied ssl cert to a test site, how do I remove it?

http,ssl,drupal,https,softlayer
I copied my site to a new virtual server with Softlayer but when I did the the security cert came to. now every time I try to log to my new development site it give warnings saying that the site has taken its cert from another source. I am using...

Drupal AngularJS ajax simple ng-repeat update

ajax,angularjs,drupal,drupal-7,drupal-ajax
i have problem replacing my ng-repeat my html inside ng-app <a href="#proceed" ng-click="order.submitOrderAjax()"> <?php print t('Finish order'); ?> </a> <ul> <li ng-repeat="error in order.errors">{{ error.text }}</li> </ul> controller app.js app.controller('orderController', function() { this.errors = []; this.submitOrderAjax = function(){ var data = {} // some data here like name, phone jQuery.ajax({...

How to redirect a deleted page of Drupal 7 to a views page

.htaccess,redirect,drupal
One of my sites has thousands of pages that are to be deleted due to their expiry, and redirected from the old paths to new pages created by views of Drupal 7. The site is using the clean url setting. Example: From: http://www.example.com/language/directory/page-path To: http://www.example.com/views-page-path I tried this: RewriteRule ^/language/directory/$...

drupal_set_message do not work

php,drupal,checkbox,drupal-7
I have these checkboxes: $severity_levels = variable_get('severity_levels', array()); // Declare empty options array $severity_options = array(); // Loop through each severity level and push to options array for form foreach (watchdog_severity_levels() as $severity) { $severity_options[$severity] = t('@description', array( '@description' => drupal_ucfirst($severity), )); } $form['severity']['severity_levels'] = array( '#type' => 'checkboxes', '#options'...

Is there a way to remove/or edit close button from ctools modal windows on drupal?

jquery,css,drupal,drupal-7
Basically that is the question "Is there a way to remove/or edit close button from ctools modal windows on drupal?" I have a windows, and I want get rid of the icon on the top right and add some text ("CLOSE") or at least get rid of that button. This...