- First commit to issue fork.
- @kunal_sahu opened merge request.
- 🇮🇳India kunal_sahu Karnataka
Hi I have created an MR , please merge , thanks
The function mailsystem_create_class() is working OK unless the files directory of a site is physically stored outside of the Drupal root. This is the case e.g. if you have Drupal installed in /var/www and the /var/www/sites/default/files is a symbolic link to e.g. /mnt/files
Some hosting strategies are locating the writable directories outside of the Drupal root for security reasons and/or for better permission management and/or for an easier backup strategy.
In this case we end up with the new class in the registry table as '/mnt/files/mailsystem//MimeMailSystem__SmtpMailSystem.mail.inc' or what ever the class name happens to be. But such a class won't be found by Drupal's autoloader as it expects all the classes to be defined relative to the Drupal root.
This module currently tries to achieve this by stripping the Drupal root from the class file name but that fails when that name is outside of the Drupal root.
A pretty simple patch is resolving that issue and of course produces the same result for all the default cases where the files directory is inside of the Drupal root.
I'll submit that patch in a second.
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Hi I have created an MR , please merge , thanks