Tasmania
Account created on 5 February 2007, over 18 years ago
#

Merge Requests

More

Recent comments

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

Well, I applied the patch and upgrade_status is happy.

🇦🇺Australia imclean Tasmania

I've added a few questions to the MR. Given the related issue is stalled, what can be done here?

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

I mean Google may require OAuth2:

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.

🇦🇺Australia imclean Tasmania

Are you using Basic authentication? Your Gmail account may require OAuth2.

🇦🇺Australia imclean Tasmania

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

🇦🇺Australia imclean Tasmania

D11 is already supported, the change here has been added to the 2.3.x branch.

🇦🇺Australia imclean Tasmania

Not directly but you could integrate it with GeoIP API to provide that information.

🇦🇺Australia imclean Tasmania

Under "Debug level" select "Full communication.

Your username is your full email address and your password is case sensitive.

🇦🇺Australia imclean Tasmania

There is a core issue which might be related: 🐛 Issue with HTML ` ` not being correctly filtered out from URLs Active

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

#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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

This would be a task, see Issue Categories .

🇦🇺Australia imclean Tasmania

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 .

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

Twitchy finger accidentally created the MR, please ignore.

🇦🇺Australia imclean Tasmania

imclean changed the visibility of the branch 3418296-no-supported-release to hidden.

🇦🇺Australia imclean Tasmania

imclean made their first commit to this issue’s fork.

🇦🇺Australia imclean Tasmania

The other issue has more action and this was created 23 minutes after it.

🇦🇺Australia imclean Tasmania

I've started a new branch for 10.3.x and above. @sarwan_verma can you update the MR for this branch?

🇦🇺Australia imclean Tasmania

Thanks for the offer @manishvaity, you are now a maintainer.

🇦🇺Australia imclean Tasmania

In terms of content, I agree with #127 and #199. It would be good to show off the product, including some admin screens.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

@qpro, just add the URLs for all the environments, the field accepts multiple values.

🇦🇺Australia imclean Tasmania

There are many unrelated changes in the MR, it should replicate the patch in either #19 or #27 (I haven't reviewed #27 properly though.)

🇦🇺Australia imclean Tasmania

Add PHPMailer SMTP.

🇦🇺Australia imclean Tasmania

I haven't made the exact changes in the MR, which were hard to follow, but I'm not seeing any errors.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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".

🇦🇺Australia imclean Tasmania

Never mind. Go to /admin/appearance/settings/civic_subtheme, go to "Content provisioning" and click "Provision content".

🇦🇺Australia imclean Tasmania

Media Download Tracker is an alternative I've written for tracking downloads not using entity_usage.

🇦🇺Australia imclean Tasmania

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
🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

@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.

🇦🇺Australia imclean Tasmania

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);
      }
    }
  }
🇦🇺Australia imclean Tasmania

<img src="/path/to/image.png"> will also work.

🇦🇺Australia imclean Tasmania

@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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

@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...

🇦🇺Australia imclean Tasmania

Added comment in MR.

🇦🇺Australia imclean Tasmania

imclean created an issue.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

#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".

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

Cache metadata may be required. Have a read through some previous issues about this: https://www.drupal.org/project/issues/webform_rest?text=ResourceResponse...

🇦🇺Australia imclean Tasmania

@4kan, I missed that one.

🇦🇺Australia imclean Tasmania

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.

🇦🇺Australia imclean Tasmania

imclean made their first commit to this issue’s fork.

Production build 0.71.5 2024