Drush not “seeing” Drupal installation

I have a drupal installation running in a vagrant virtual machine. This works fine, but when I try to use Drush on this site I get very peculiar behavior. The modules that are listed when I run “drush pm-list” are all from a non-existent Drupal 8 installation. I have tried setting –root= and –uri= but to no avail. Drush simply ignores my real Drupal 7 installation and instead outputs non-existent modules from a non-existent installation??

Drupal db select IN, group by count

need a bit of help please, when i write my query like this it works fine

    $  query = db_query('select * from form_submissions where address in (select address from form_submissions group by address having count(address) > 1 ');     $  submissions = $  query->execute(); 

but when i write it with drupal it should work like this? but it dont

    $  query = db_select('form_submissions', 'sfs')->fields('sfs', array());     $  subquery = db_select('form_submissions', '')->fields('address', array())->groupBy('address')->having('count(address) > 1');     $  query->condition('address', $  subquery, 'in');      $  submissions = $  query->execute(); 

can someone see what im doing wrong?

Sending an email to everyone with a certain role using rules in Drupal 7

Thanks for reading!

Me: Small business owner with no coding or Drupal background who wants to learn by doing instead of hiring a developer for every small thing.

Goal: I have a Drupal 7 website and would like to send different types of emails to users of specific roles using the Rules (or an easier way if you care to suggest it). I’ve explored using Rules to accomplish this with some success by cloning similar ones and making small changes, but making one from scratch is more challenging. I’ve wrapped my head around scheduling the event and creating the email in the action, but specifically editing the condition is a barrier. I assume that the element “User has role(s)” is what I should use, but I’m confused on how to drill down the “data selector” under the USER area. I’d like the system to evaluate all members of the site and email everyone with a specific role…I don’t see an appropriate option. Maybe I’m looking at the wrong condition element. Little lost – I’m sure it is a painfully obvious to someone who knows what they’re doing.

All constructive suggestions and guidance welcome on how to accomplish this – trying to learn! Thank you!

Node export drupal 8

I try to export nodes from a drupal8 site to another drupal8 site. I use the “node export module”, version 8.x-1.x-dev. My problem is that I can’t pass the images to the new site. I tried these patches https://www.drupal.org/project/node_export/issues/3006186 but hadn’t any luck. I also try to copy the sites/default/files but nothing.

Some of the nodes have galleries and it seems in the edit that there are images, image1, image2 etc but not the image url.

Any suggestions;

Removing injected OS commands in POST URLs in Drupal 8x

I’ve been using Burp to evaluate my Drupal 8 site and I found a OS command injection exploit.

The problem is I don’t know where to insert the routine to get rid of the unwanted injected code. I’ve tried InboundPathProcessorInterface and OutboundPathProcessorInterface and they don’t work!

POST /contact-us%7cping%20-n%2021%20127.0.0.1%7c%7c%60ping%20-c%2021%20127.0.0.1%60%20%23'%20%7cping%20-n%2021%20127.0.0.1%7c%7c%60ping%20-c%2021%20127.0.0.1%60%20%23%5c%22%20%7cping%20-n%2021%20127.0.0.1 HTTP/1.1 Host: x.x.x.x Accept-Encoding: gzip, deflate Accept: */* Accept-Language: en User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0) Connection: close Referer: https://x.x.x.x/contact-us Content-Type: application/x-www-form-urlencoded Content-Length: 364 

NodeSquirrel & Drupal 8

Wondering if anyone has experience using the cloud database backup service NodeSquirrel? This service was integrated in the "Backup & Migrate" module for Drupal 7 but does not work in the D8 version yet. Recommended to security audit any company that will have a complete copy of a website database including user passwords but on a technical level same as a third-party web hosting company. One site is free with 5 GB storage, other plans $ 10 to $ 50 per month.

How can I programmatically add a link that redirects users to Drupal Parent site?

I’m currently building a drupal multi-site and I’m trying to figure out if there was a way to add a link programmatically that redirects to the Drupal Parent Site

Using {{ url('<front>') }} only redirects to the home page of the multi-site. I could just add it manually but I was searching to make it dynamic instead.

Drupal 7: how to hide link to file on a rendered file display?

I have a problem that I’m unable to solve. I created content type named test player to display files with able player, that is an accessible audio player for blind users. So, I installed requested modules, and it works fine. Now, in page displayed, there is a link to file, that shows a page with file name and other info. This link is read before audioplayer tag from screen reading software, so, if the user click this link, it reaches that dosn’t have audioplayer, but only name of the file. I want to display only the audio player without the link to this file. There is a way? I tried with an ohter audio player, but the link appears again.