Still needs tests.
At the very least this should be updated as it's simply incorrect.
* - attributes: An associative array of attributes to be placed in the a tag.
*/
function template_preprocess_file_link(&$variables): void {}
file-link.html.twig:
<span{{ attributes }}>{{ link }}</span>
{% if file_size %}
<span>({{ file_size }})</span>
{% endif %}
The attributes are applied to the wrapper element, not the a tag. See file.module for what's done with attributes.
How does this work without a base theme? Contrib Seven → doesn't have a Drupal 11 version yet 📌 Automated Drupal 11 compatibility fixes for seven Needs review , and it was removed from core in D11.
Well, I applied the patch and upgrade_status is happy.
I've added a few questions to the MR. Given the related issue is stalled, what can be done here?
That shouldn't make a difference. To start with, have a look at the information in the links I posted. This isn't an issue with the module itself.
I mean Google may require OAuth2:
- https://support.google.com/a/answer/14114704?hl=en
- https://support.google.com/accounts/answer/6010255?hl=en
Are you using your full email address as the username?
do you mean drupal/oauth2? Because it doesn't have a stable version.
Whether to use it or not is up to you, that's not something I can help you with.
That said, it looks like there is a stable release, as well as a module on Github which integrates the OAuth2 module with PHPMailer SMTP.
Are you using Basic authentication? Your Gmail account may require OAuth2.
Committed to 2.3.x along with some other minor tidying. Markdown in Drupal doesn't yet have coding standards: 🌱 Adopt CommonMark spec for Markdown files Needs work
D11 is already supported, the change here has been added to the 2.3.x branch.
Not directly but you could integrate it with GeoIP API → to provide that information.
Under "Debug level" select "Full communication.
Your username is your full email address and your password is case sensitive.
There is a core issue which might be related: 🐛 Issue with HTML ` ` not being correctly filtered out from URLs Active
The problem also occurs when using a "REST Export" display and selecting "Data export" as the style.
render()
in Drupal\views_data_export\Plugin\views\style\DataExport
uses core's serializer so I guess ultimately the problem should/could be fixed there, but it would be useful if this module supported the option to decode HTML entities.
system_time_zones() is deprecated → .
Reopening as a feature request. It would be great to be able to filter based on numbers and dates, as per #5. NW for the 2.0.x branch.
imclean → created an issue. See original summary → .
#76:
+++ b/core/modules/file/file.module
@@ -1435,7 +1435,7 @@ function file_managed_file_save_upload($element, FormStateInterface $form_state)
- \Drupal::logger('file')->notice('The upload directory %directory for the file field %name could not be created or is not accessible. A newly uploaded file could not be saved in this directory as a consequence, and the upload was canceled.', ['%directory' => $destination, '%name' => $element['#field_name']]);
+ \Drupal::logger('file')->notice('TThe upload directory %directory for the %name field could not be created or is not accessible, so the uploaded file was not saved.', ['%directory' => $destination, '%name' => $element['#field_name']]);
From the issue summary:
The problem being that on non-entity forms #field_name is not set
This issue is about removing the reliance on $element['#field_name']
being set.
Another way this problem shows itself is if the %name parameter is NULL when file.module logs an error, then the dblog page displays a white screen with the text "The website encountered an unexpected error. Try again later." The only way to fix this is to delete the entry in the watchdog table.
Here's a slightly different view based on a specific situation. I'm a maintainer of https://www.drupal.org/project/file_upload_options → and accepted a Tata employee as co-maintainer. I looked into this person and the company they work for and noticed all the requests to be a co-maintainer, many of which were rejected.
The module has very low usage and I haven't been maintaining it as much as I'd hoped to. As expected, so far only D11 compatibility has been addressed but I'm hoping he will show more interest in improving the module. Either way, I'm monitoring commits and issues and if it doesn't work out I'll remove him as co-maintainer.
This is something I've done in the past when people have offered to help, even ones with experience, then done absolutely nothing apart from getting their name on the maintainers list.
This is possible by creating a view. There are a number of ways but I've used a view of "products".
- Add a relationship to Product Variation
- Add a relationship to Stock Location using the above relationship
- Add required fields (Product title, Stock Location: Name, Local Stock Location Level: Quantity)
Make sure you've run cron after stock transactions as that's when the data gets added to the commerce_stock_location_level table.
Bunny.net's oembed response doesn't return thumbnail dimensions so resulted in an error when trying to add a video. After applying the changes in the patch manually the oembed resource was accepted.
One related problem is that Bunny.net returns a thumbnail URL, which means it should also return the thumbnail dimensions according to the oEmbed specs, but it doesn't.
This would be a task, see Issue Categories → .
See #5, #7, and #10. Reopen if you're interested enough to provide a solution where the key module is supported and optional
A link to instructions on how to integrate with the Key module has long been on the project page → .
Thanks for the offer. I've made you a maintainer as I have limited time to work on this module. Please review outstanding issues as well as there is more to do than just make it D11 compatible.
Twitchy finger accidentally created the MR, please ignore.
imclean → changed the visibility of the branch 3418296-no-supported-release to hidden.
The other issue has more action and this was created 23 minutes after it.
I've started a new branch for 10.3.x and above. @sarwan_verma can you update the MR for this branch?
Thanks for the offer @manishvaity, you are now a maintainer.
Unfortunately this change means that we will lose compatibility with Drupal 10.2 and below.
It might be worth creating a new major version for 10.3 and up.
I've tested and reviewed the code and it does what it claims to do. Although I alone am not the community, if you're happy for a single review then I'll update the status.
This works well and is a valuable addition to the module. We use Views Data Export for a lot of our clients and being able to export the data for processing makes this even more useful.
@qpro, just add the URLs for all the environments, the field accepts multiple values.
I haven't made the exact changes in the MR, which were hard to follow, but I'm not seeing any errors.
This is in dev.
The iframe element will have width=""
and height=""
attributes. The width and height values returned from the oembed provider will allow you to work out the aspect ratio, but this would require more than just CSS to make use of.
That said, I tend to use FitVids → to solve this problem.
Ref: https://www.php.net/manual/en/function.realpath.php
Note:
The running script must have executable permissions on all directories in the hierarchy, otherwise realpath() will return false.
If a parent directory doesn't exist then realpath will return false, excluding it from this module's file_exists check and therefore not showing it in the "not on server report".
Never mind. Go to /admin/appearance/settings/civic_subtheme
, go to "Content provisioning" and click "Provision content".
Media Download Tracker → is an alternative I've written for tracking downloads not using entity_usage.
I'm seeing this error every no matter how I install the theme and subtheme so I'm not sure my "steps to reproduce" would actually help.
I've tried following:
- the project page:
https://www.drupal.org/project/civictheme →
- the docs: https://docs.civictheme.io/development/drupal-theme, https://docs.civictheme.io/development/drupal-theme/sub-theme
- the "Next steps" after installing civic theme subtheme dependencies:
npm install
npm run build
npm run storybook
Enable theme in Drupal:
drush theme:enable civictheme -y
drush config-set system.theme default civictheme
drush theme:enable dink_civic -y
drush config-set system.theme default dink_civic
I've tried via GUI and Drush for each step. Using Drush to install CivicTheme produced the following "warnings":
drush then civictheme
[warning] The "extra_field_block:node:civictheme_page:content_moderation_control" was not found
[warning] The "extra_field_block:node:civictheme_page:content_moderation_control" was not found
[warning] The "extra_field_block:node:civictheme_event:content_moderation_control" was not found
[warning] The "extra_field_block:node:civictheme_event:content_moderation_control" was not found
[warning] The "block_content:50c52459-c100-4e4d-92a4-9c4c77d8f8d0" was not found
[warning] The "block_content:7cf65f98-cbae-4e9d-b6ea-7d6d1c437c1c" was not found
[warning] The "block_content:d7098a8c-3ba3-48f7-bc0c-5787ebaa0427" was not found
[warning] The "block_content:5c0ad15f-3e9c-4eeb-8525-7a064b06fc58" was not found
[warning] The "block_content:b7f36176-620f-4178-aadd-9b448c610986" was not found
[warning] The "block_content:286ff750-a9a9-423a-8a4e-515f79fc0a8f" was not found
[warning] The "block_content:5508dc51-1cf8-4577-9038-b572fbd698ae" was not found
I came across this recently where installing the subtheme via the GUI timed out the first time then didn't seem to properly install and I got the error in 🐛 Installing civictheme via drush results in "This block is broken or missing." on main page Postponed: needs info . I uninstalled the subtheme and reinstalled it but still had the same error.
When I then set CivicTheme as the default it also had the missing block error, even though it was fine the first time I tested it. I then uninstalled the subtheme and CivicTheme and tried to reinstall CivicTheme and got the error: "Configuration (...) provided by civictheme already exist in active configuration".
This is with a fresh install of GovCMS so I can just reinstall it again but this may not be the case in all situations.
@sarwan_verma this module supports Drupal versions from 8.8 onwards. At the very least I'd like to support 9 and 10 as well as 11. This requires using the DeprecationHelper to maintain backward compatibility. This is described in the change record I linked to in #6.
I suspect the culprit might be this line in Drupal\auditfiles\Auditor\AuditFilesNotOnServer
:
$target = $this->fileSystem->realpath($result->uri);
This is converting a URI found in the file_managed
table to a realpath, but it appears to return false
if the file parent directory doesn't exist when it needs to return the full path to the missing file.
For context, here's the entire method:
public function getReferences(): \Generator {
$maximumRecords = $this->auditFilesConfig->getReportOptionsMaximumRecords();
$query = $this->connection->select('file_managed', 'fm');
$query
->orderBy('changed', 'DESC')
->range(0, $maximumRecords)
->fields('fm', ['fid', 'uri']);
/** @var array<object{uri: string, fid: string}> $results */
$results = $query->execute()->fetchAll();
foreach ($results as $result) {
$target = $this->fileSystem->realpath($result->uri);
if ($target !== FALSE && !file_exists($target)) {
yield FileEntityReference::create((int) $result->fid);
}
}
}
<img src="/path/to/image.png">
will also work.
@joseph.olstad phpmailer_smtp uses the PHPMailer library as much as possible rather than duplicating its functions. For example, you won't find a single preg_match in the module either, and all address parsing is done by the library.
To understand how the module works it helps to have some knowledge of the PHPMailer library.
Specifically, in the format()
method of Drupal\phpmailer_smtp\Plugin\Mail\PhpMailerSmtp
there is the following line:
$this->msgHTML($rendered, DRUPAL_ROOT, TRUE);
This sends the message HTML to the PHPMailer library for processing, including inline attachments. So rather than a bunch of if/then/else statement and calling the inline attachment functions directly, this leaves it up to PHPMailer to determine, including generating a cid.
Have a look at /vendor/phpmailer/phpmailer/src/PHPMailer.php
for more information.
I've changed this to a task so if the documentation is lacking in this area I'm happy to accept an MR.
This is already possible.
Including an image or other file reference within the HTML or template file, which can either be a path to the image or base64 encoded data within the <img>
tag, will result in the image being embedded and referenced by the cid.
I'll leave this open, let me know if you have a different scenario in mind.
I was following the existing pattern but yeah, I tend to agree.
It might be better to rewrite it to check for Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem
using is_a()
or similar. Or if it implements Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemInterface
. But this might be tricky to do in annotations.
Applied this and the MR In 🐛 PluginNotFoundException: The "" plugin does not exist Needs review and can now use field states for select lists within paragraphs.
Another option would be to use the visibilitychange event which works more reliably on mobile platforms than beforeunload.
I just checked and the deprecated method will be removed in Drupal 12, not 11. I'll tag a Drupal 11 release and this can be fixed later.
I'd like to soon but I'm not sure the change proposed in the merge doesn't break compatibility with older Drupal versions.
@sarwan_verma can you review the change record I linked to.
@joseph.olstad yes this module doesn't need to be patched to make use of the Key module. Although including Key support directly can simplify the experience for the end user.
@liquidcms I checked one of the modules you mentioned and it optionally supports Key if it's installed. https://git.drupalcode.org/project/s3fs/-/blob/8.x-3.x/src/Form/Settings...
Added comment in MR.
Thanks @sarwan_verma. Will the module still work with versions of Drupal prior to 10.3 after this change? See the change record → for more information.
#5 see the response to your issue #3460838-3: Allow rows name property to be customizable. → (Views REST Serializer Extra ):
This module does allow changing the key names FYI:
@Sivaji_Ganesh_Jojodae, please fill in the section "Steps to reproduce" in the issue summary. It needs more information than just "Some of our views".
Composer or Ludwig → is required to install the module and its dependency, PHPMailer, as per the project page → .
One option is to set up a local development environment with composer to build the website then deploy it to your host.
Cache metadata may be required. Have a read through some previous issues about this: https://www.drupal.org/project/issues/webform_rest?text=ResourceResponse... →
@4kan, I missed that one.
Error in db log when going to Admin -> Config -> User interface -> Flipbook Settings
TypeError: Drupal\flipbook\Form\ChoosePdfStyleForm::__construct(): Argument #1 ($config) must be of type Drupal\Core\Config\ConfigFactoryInterface, Drupal\Core\Messenger\Messenger given, called in /web/modules/contrib/flipbook/src/Form/ChoosePdfStyleForm.php on line 52 in Drupal\flipbook\Form\ChoosePdfStyleForm->__construct() (line 39 of /web/modules/contrib/flipbook/src/Form/ChoosePdfStyleForm.php).
The parameters supplied from create()
are in a different order to what __construct()
expects. I've also re-ordered the assigmnents in __construct()
to match the order of the parameters.