drupal 8 follows symbolic links in default / files

I run under Drupal 8.7.6.
My default / files is a symbolic link to a read-only mount:

files -> /mnt/files_ro

Drupal needs to write in a few folders because it aggregates and caches assets such as css, js, php / twig, ….
So I created a read and write montage. And created a number of symlinks from / mnt / files_ro:

css -> /mnt/files_rw/css/
js -> /mnt/files_rw/js/
styles -> /mnt/files_rw/styles/

Now Drupal is generating the same errors it would have if the / default files had incorrect file permissions. but my files_rw directory belongs to the Apache user and is writable.

I've done enough tests to make sure the problem is not a simple file authorization.

I also know that in D7, you had to patch Core if you wanted Drupal to follow symlinks.

How to make D8 follow symbolic links in the / files / directory? Has anyone else done that?

8 – CDN provider jsDelivr does not work with bootstrap for drupal

I'm trying to create a Drupal theme with bootstrap. However, my boostrap is not loaded due to jsDelivr malfunctions (I think).



PS: Does anyone know of any good Drupal guides / books? Because I have to make a drupal website, and my "course" (for which I have to do the site) does not explain things well.

Drupal 8 duplicate content between multiple sites

I am working on a feature of a Drupal 8 multisite with separate databases for each site trying to implement the following required elements.

When publishing information on the main site (all other sites are subdomains), the user must have the opportunity to choose from other sites on which he wishes the same information are available.

I start doing this with a module and brackets, BTW, I had never worked with Drupal before, and I guess if there is an existing module that could do it.

Would any one recommend a module that I could try?

Thank you for any help

.htaccess – How does Drupal handle clean URLs with 200 response codes without creating RewriteMap?

I'd like to know how Drupal handles net URLs without getting a 302 redirect response.

When you have enabled clean URLs, the ?q=123 part of the link goes to /my-node-title and you do not get a 302 redirect but a clean answer 200.

My question is about the code that allows this, and not how to sort the elements of the user interface.

I want to understand how it works, because it should make RewriteMap apache, but in Drupal installations, users do not usually have access to apache modification.

Thank you.

Drupal 8 – the website would not load for an anonymous user. This leads to an allowable memory size of 629145600 bytes out of print

We have a Drupal 8.7.6 that works perfectly when you are logged in as an administrator – all pages, features work well with good performance.

When I tried to load the website as an anonymous user – it continues to run and eventually ends with 504 incorrect gateways and in the logs, the following error appears:

2019/08/14 20:39:42 (error) 25423 # 25423: * 15460 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 629145600 bytes exhausted (attempt to allocate 20480 bytes ) in / core / lib / Drupal / Core / Entity / ContentEntityBase.php on line 191 "when reading the header of the response from the upstream

(error) 25423 # 25423: * 14852 FastCGI sent in stderr: "PHP message: Fatal PHP error: 30 seconds maximum execution time exceeded in /core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php at line 606 "when reading the upstream response header

Everything was working fine until yesterday, before the migration of users and the content of our old Drupal 6 system started.

We have a similar configuration for our development environment that works perfectly.

I've tried setting the runtime to 0 in settings.php, increasing the allowed memory, etc., but this problem still persists. A lot of data has been migrated and I will not be able to restore it from the new copy.

Please recommend possible ways to solve this problem – thanks in advance.

theming – Hide SVG image based on Responsive Viewport with CSS [Drupal v7.6x View]

Using Drupal 7 Views I've created a view that shows an SVG image file.

Here is an example of a scenario:
A marketing article node is created periodically when a specific Prodcut offer is in place, the purpose being to show users a new product offer (award, etc.) that this offer includes in the node article 2 the variants of the graphical image of the reduction SVG i): a complete graph for the windows of office / laptop ii): a graph of smaller alternative size for the mobile devices (cellular) such as iPhone / Android. The two images are listed at the time of node creation, but ONE is to display a window.

Using a simple custom Drupal view, the 2 images are displayed singularly on an appropriate page (a landing page should be sufficient for example) depending on the size of the window, but my problem is that both images are displayed (on the Office) and even though I have experimented with CSS in the view field options and the 'attribute & # 39; and the CSS field modules considered, and even more, to no avail.

Again, you need to access the INDIVIDUAL files for the CSS media rule to be applied at the CSS level.

In addition, I have considered adding a CSS field to the image type in the file type module of the system, but I am not sure if I can access it. Maybe my approach is wrong or just missing something.

My final alternative would only create two types of views for each window and hide in the panel.

Some indications and directional advice are welcome. I spent more than 4 hours trying to find a solution.
Thank you.

What follows is not suitable:
Different sensitive images per stop point

.htaccess – 502 Bad Gateway nginx for a site installation Drupal subdirectory

I have a default Drupal 8 site installation and a subdirectory site installation. The second Drupal site was thought to be hosted on the default site URL in a subfolder. the two sites share the same database, the second site having a prefix for its tables.

The problem I encounter with the second site, the landing page works perfectly, but any other page is a problem, oddly enough when I see on incognito the other pages work, but when I refresh, I get the error 502 Bad Gateway .

the folder structure is as follows

 - core
 - libraries
 - modules
 - node_modules
 - profiles
 - sites
 - themes (custom default theme here)
 - vendor
 - site2 (where i installed the second site with its own custom theme)
 - default drupal files (index.php, .htaccess ....)

I did not change anything in the two .htaccess files, I also tried in site2 .htaccess without comment and updated the RewriteBase / site2 but I still get the 502.

If anyone could even point me in the right direction, I've googled and tried many changes in the .htaccess files.

Is it possible to send data from an HTML form to a web form (drupal 7)?

I have already designed the form. I want to do the following thing: when the user clicks on the submit button, the data is sent as if it came from WebForm. Can I do it using Drupal? And should I use ajax for this? Maybe I can just change the action?
Drupal 7

Download the file on s3 directly from Drupal 8 instead using temporary storage

I have a file download form in Drupal 8 where I download 3 different asset files, whose size can be about 2 GB or more.
The s3fs module is enabled and configured correctly, but because of temporary storage, it takes a long time to download to the Web server. It downloads first to the "/ tmp" directory, then to "s3". I've also modified the Apache settings to handle large file downloads.

Is it possible to speed up this download process?
If it is possible, how to recover the properties of the downloaded file for an editing action on the same form?

Can Drush 9 be used with Drupal 7?

I have a Drupal 7 site that was not built with Composer. I'm using Drush 7 with, but about a week ago, drush wd-show --tail stopped working, I do not get any output. I've installed Drush 9, but I have trouble setting it up.

I have created an XML file, according to the example., The instructions say to put aliases in $PROJECT/drush/sites/self.site.yml but I do not have a project root with composer.json – can I get this to work without using Composer to build my site? Or does Drush 9 depend on the Drupal site using Composer?

I'm using the local version of the site in MAMP on my Mac. I created sites/drush/sites/self.site.yml – it contains:

  root: /Users/pglatz/dev/wdocs/wdocs-code/www
  uri: 'https://www.whiskerdocs-local-qa.pglatz.com/'

The command I use is:

$ drush9 @local --alias-path=/Users/pglatz/dev/wdocs/wdocs-code/www/sites/drush/sites --root=/Users/pglatz/dev/wdocs/wdocs-code/www

When I run it, I get the error:

The wd-show command was not found. Pass –root or an @siteAlias ​​to run specific Drupal commands.

But I pass --root and a site alias. Probably a stupid syntax error on my part, but I can not understand it. What am I doing wrong? And how can I get Drush to work properly again?