It would be good to filter out the outdated content. I'm using this patch with a slight change.
if ($entity instanceof ParagraphInterface) {
$hierarchy = [];
$parentEntity = $this->getParentEntity($entity, $hierarchy);
$isOutdatedParagraph = empty($parentEntity) || !$this->isReferencedInCurrentRevision($parentEntity, $hierarchy);
}
if ($isOutdatedParagraph) {
return [];
}
I don't want outdated content checked at all.
Drupal\google_analytics_reports\Plugin\views\filter\GoogleAnalyticsNumeric needs some work to get it working properly and support min max, which currently generates an error.
I'm out of time to work on this, but for my current project I just removed support for min and max.
This still has problems with min/max causing errors.
I'm changing the scope of this to focus on properly supporting numeric filters. At the least, GoogleAnalyticsQuery needs to use the following classes:
Google\Analytics\Data\V1beta\Filter\NumericFilter
Google\Analytics\Data\V1beta\Filter\NumericFilter\Operation
In the meantime, I've found a problem where the correct filter wasn't being selected due to checking for lowercase "metric". This is a quick fix for all metrics.
@gilmord, that is a bit cleaner. I'll use it for an eventCount field but ideally all field types would be handled automatically.
Google\Analytics\Data\V1beta\MetricType
has a static function for looking up the names.
imclean → created an issue. See original summary → .
Can you create an MR for this?
Also, is your other issue necessary: 💬 Upgrade module to use Microsoft Graph Apis instead of old windows apis Active
There are a few issues on this topic.
But of course Drupal scaffolding likes overwriting such files. To prevent this, add a "file-mapping" under drupal-scaffold (under extra) in your root composer.json:
"drupal-scaffold": {
"locations": {
"web-root": "web/"
},
"file-mapping": {
"[project-root]/.gitattributes": false
}
},
A another approach is to convert the format to a timestamp and leave the data_type as it is. This allows you to select the date display format within the view.
/**
* Implements hook_views_post_execute().
*
* @param ViewExecutable $view
*/
function MY_MODULE_views_post_execute(ViewExecutable $view) {
if ($view->id() === 'VIEW_ID' ) {
foreach ($view->result as &$result) {
$result->date = strtotime($result->date);
}
}
}
When this problem triggers an error, it doesn't seem to pass on the field name to the logger. This then results in another error: 🐛 TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given Needs review
Here's what I needed to do to resolve the "fail to push limit" issue, with a working local copy. Pretty much based on previous replies, with an extra step.
Added to the top of the root .gitattributes file:
vendor/google/** -text
Then the following git commands:
git add .gitattributes
git add --renormalize vendor/google/
Then commit and push as needed.
@johnv,
- The buildConfigurationForm from the Event is removed. IMO events have no configuration
The event for core's Workflows transition includes optional configuration for the from and to state.
I can't get this to work properly and I've run out of time at the moment.
@johnv:
- The buildConfigurationForm from the Condition - I do not understand how the UI gets its values. The code has no default values, but the UI has
When using the WorkflowFieldValue condition after detecting a transition event, the selected items (field name, field value, expected value etc.) can't be found and all end up empty, therefore always returning true no matter what is set in the config form.
The config form has the correct values.
OK BPMN.iO is working fine.
However, the transition event is firing more than once for each transition.
MR created but it probably still needs some work.
There are a lot of things in the repository which shouldn't be, such as .local-dev and links to other repositories.
Another problem is that the transition event can be triggered multiple times.
For example, on a workflow transition with the condition "compare workflow field value" set to "Published" , the action "Publish content item" is fired.
Publishing the content item then triggers another transistion event. Comparing the previous and and current states in HookHandler shows they are still different, even though they probably shoudn't be.
+ $configuration = $form_state->getValues();
+ // The $values are not set to the latest values, so read from $input.
+ $configuration = $form_state->getUserInput()['configuration'];
$configuration
is assigned twice.
Also, that last line should be:
$configuration = $form_state->getUserInput()['condition'];
This is using ECA Classic Modeller because BPMN.iO doesn't seem support the "PMT: compare workflow field value" condition.
I'm using this to send an email on state change, however the email is sent twice. I'm not sure why at this stage.
This seems related.
If you're not logged in, you can inspect the login button with your browser's deveoper tools and change <code>type="button"</code> to <code>type="submit"<?code>. Leave developer tools open and the submit button will function as expected.
From the IS: "Let's say, I made changes of link setup and now I want to confirm that it works as I expected."
I missed the significance of this. OK this makes sense.
@joelpittet, that's fine, I'm just struggling to understand the use case for the original issue, which makes it hard to review.
Going back to first principles, can the IS be updated with a detailed explanation beyond just avoiding cron. For example, when a link on an entity is no longer valid - what are the next steps?
And, as I said, we don't need another "rescan all links" button, because there already is one.
There already is a button for rescanning on demand: "Clear link data and analyze content for links"
What problem is this issue addressing? (Taking into account my previous comments above.)
I'm using the views field to recheck individual links, but the link is no longer valid so always returns an error.
I mean, what's the objective of the MR? For example, say you have some external links on your site which are no longer working. How does this MR help?
@joseph.olstad
For us we want to do a full scan with button press without waiting for cron.
Yes, that's what we want as well.
The current MR allows you to check the remote links again, however usually the problem with remote links is that they've changed so rescanning the links stored in the database will continually return the same error.
Dead/broken links are changed by updating the entity with new links, or just removing the broken links. After that, the entity needs to be checked again.
There is already a way to do a full scan of all entities. On the linkchecker config screen, under "Maintenance", it's the button "Clear link data and analyze content for links". This could take a while on larger sites.
Being able to rescan individual entities on demand could be useful. It would need to also verify the dead link isn't on any other pages before removing it from the broken link report.
That said, I'm curious as to how you are using this MR. Are you checking internal, external or both types of links? How does the MR help?
Ignore the above, I'm having patching issues.
Should this work with forms loaded via ajax? I've applied the patch to the 4.0.x branch but it hasn't made any difference.
In my case, the target fieldset and controlling fields are within a paragraph type. When adding a new paragraph the fields are correctly shown or hidden while the fieldset wrapper is always visible.
I guess this would probably be a more appropriate status.
Sounds good, but that's not quite how open source works. Rather than requesting someone give you something for free, you can contribute to ensuring this is the correct solution.
In this case, the bare minimum would be to apply the MR to your own code to see if it's usable with D10/D11.
@joelpittet, yes I'm using MR !114 on 2.1.x.
There's a problem with this approach.
When there's a broken link on a page, usually the page needs to be updated with the new link or the link is removed altogether.
Using this MR, you can recheck a single link or all links, which it does, but it will continue to return the same error if the remote link isn't valid any more.
It might be more useful to rescan the entity/entities the link was on.
In other words, the broken link itself isn't the problem, the problem is the entity which contains the broken link.
Commerce Payment Fee → and Commerce Payment Fee Stripe → could be an option.
Adds support for filtering on empty and not empty. There may be a neater way to do this but it is functional.
This is actually possible. EmptyFilter() works as advertised, just need to work out how to negate it, presumably with a notExpression.
Or not. Google's AI states:
The Filter.Empty filter in Google Analytics Data API v1beta is not a standard filter type and doesn't exist as a defined object or class within the API's documentation. It's likely a placeholder or a reference to a filter that does not apply any filtering logic, essentially representing an unfiltered view of the data.
Looking at the code, it doesn't look like it does anything.
@megan_m I've created a new issue: ✨ Add support for EmptyFilter Active
I'm also having this issue when using a string filter on a custom dimension.
Other things I've tried result in #3346317-7: Views filter string not working → :
Error occurred! Google\ApiCore\ApiException: { "message": "Unsupported regular expression syntax in value. See https:\/\/github.com\/google\/re2\/wiki\/Syntax for supported syntax. invalid perl operator: (?!", "code": 3, "status": "INVALID_ARGUMENT", "details": [] }
Clearing the links and rechecking fixed the problem.
Using the MR with 2.1.x, I'm seeing the following error when trying to view a report:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of /web/core/lib/Drupal/Core/Entity/EntityTypeManager.php).
The issue seems to come from here:
/web/modules/contrib/linkchecker/src/LinkCheckerLinkAccessControlHandler.php(68): Drupal\linkchecker\Entity\LinkCheckerLink->getParentEntity()
/web/modules/contrib/linkchecker/src/LinkCheckerLinkAccessControlHandler.php(58): Drupal\linkchecker\LinkCheckerLinkAccessControlHandler->checkParentEntityAccess()
Does the view need to be modified before this feature can be used?
@jonathanshaw I'm not sure what you mean, can you explain the exact scenario and how to replicate the problem?
Too late for this issue, but this looks like it could be a useful library for parsing a string of email addresses: https://packagist.org/packages/mmucklo/email-parse (github repository).
Although, when using a custom field formatter for file fields it's not clear how to set this option within the field formatter. The link URL object is generated in the preprocess function, and there's no way to pass additional attributes to the link element, only the warapper element.
Confirming #60 by setting the target for the link to _blank, which was my main use for this. I can't comment on anyone else's requirements.
function MY_THEME_preprocess_file_link(&$variables): void {
$attributes = $variables['link']['#url']->getOption('attributes');
$attributes['target'] = '_blank';
$variables['link']['#url']->setOption('attributes', $attributes);
}
Never mind, the error was all mine.
Thanks, I got around the immediate problem by moving Adminimal and Seven under custom themes.
The main issue is how to progress this issue. There can't be an official D11 release before Seven has one.
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 → .