πŸ‡ΊπŸ‡ΈUnited States @bwong

Account created on 11 July 2007, almost 17 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States bwong

It can although you need to tag the users in some fashion. This could be used to group users.

πŸ‡ΊπŸ‡ΈUnited States bwong

Same issue on Drupal 9.5.11. Moved back to 1.28

πŸ‡ΊπŸ‡ΈUnited States bwong

1.13 has the support in TOC. I had only implemented it in the Edit block TOC.

πŸ‡ΊπŸ‡ΈUnited States bwong

For some reason that does not follow through so I added my own. Probably need to go back and figure out how they did it but 1.12 does this. The class is book-blocks-active.

πŸ‡ΊπŸ‡ΈUnited States bwong

This may be a little harder to do because the Book module's function is used to generate the table of contents. Figuring out which element is the current page make require replicating and reworking that function. I am looking at what needs to be done to see what is required.

πŸ‡ΊπŸ‡ΈUnited States bwong

This can be done now using substitution using this string in the Link URL for one of the links:
/admin/structure/book/{{ book_id }}

πŸ‡ΊπŸ‡ΈUnited States bwong

Addressed this and other Drupal 9/10 issues in 1.11. Finally tested it properly on a brand new install.

πŸ‡ΊπŸ‡ΈUnited States bwong

Sorry. Did not upload the proper files. There were missing definitions.

Don't use 1.9. Fixed in 1.10.

πŸ‡ΊπŸ‡ΈUnited States bwong

I need to make the example and documentation a lot clearer. The one thing that tends to be missing is that the URL used to view the node has to have query parameter so the entity view knows what to look for. This gets more complicated as the system supports multiple tags so that a particular node could appear in different streams although usually it is only within one. A typical URL would look like this:

https://drupal.dom/node/48?tag=1

The entity view is used to get the link and title that is show. This allows a usual title to be used or a shorter on if there is another field. It might also include the type of node, etc. if that would be useful information to the viewer.

πŸ‡ΊπŸ‡ΈUnited States bwong

This looks like a missing dependency with Twig Tweak that 1.3 should address.

πŸ‡ΊπŸ‡ΈUnited States bwong

Hook_help added. Different text.

πŸ‡ΊπŸ‡ΈUnited States bwong

Minimal changes made to documentation and hook_help.

πŸ‡ΊπŸ‡ΈUnited States bwong

Fixed in 1.0.0-Beta2

πŸ‡ΊπŸ‡ΈUnited States bwong

What is myIP in the view? The dump with //string(6) "23.106.56.12" result seems odd. It could be something to do how Twig is handling a non-string value.

πŸ‡ΊπŸ‡ΈUnited States bwong

I will do some more checking but I think I removed the twig dependency before I made the project public so that dependency may go away.

πŸ‡ΊπŸ‡ΈUnited States bwong

This patch was initially submitted to address an integration issue with modules like Views Raw SQL β†’ .

As it turns out, I didn't fully understand the entire mechanism for implementing aggregation. Turns out that selection a method other than Group By replaces the handler with NumericField that essentially ignores the existing handler and it assumes that a field is involved. There are two ways to address this. The more complicated way, and possibly better, is to come up with a NumericField replacement and change how the handler is changed. The replacement could keep the details of the original field support in place. The other alternative is to put any support for aggregation into the desired plugin.

I chose the latter with the Views Raw SQL #15023002 patch #5 πŸ› the Value is lost with Aggregation Needs review . This essentially keeps the Group By setting but hides it so the NumericField substitution does not occur. The aggregation support is handled by replacing the options form selection with a new one and using the value in the aggregation support handled by the original field support.

For Views Raw SQL, this solution works for all of the field types including field, filter, sort and argument.

The solution I presented here does not really address the issue as it is trying to adjust changes imposed by NumericField. Assuming either approach above, the need for an aggregation override is not needed. If this is the case then this issue should be closed.

πŸ‡ΊπŸ‡ΈUnited States bwong

This is fixed by #15023002 patch #5 πŸ› the Value is lost with Aggregation Needs review

πŸ‡ΊπŸ‡ΈUnited States bwong

This is fixed by #15023002 patch #5 πŸ› the Value is lost with Aggregation Needs review

πŸ‡ΊπŸ‡ΈUnited States bwong

This is fixed by #15023002 patch #5 πŸ› the Value is lost with Aggregation Needs review

πŸ‡ΊπŸ‡ΈUnited States bwong

This is almost a complete rewrite of the 8.x version. It works with Drupal versions 8 through 10. It includes support for fields, filters, sorts, and arguments. It adds token replacement and works with aggregation. A full version is include in case you don't want to contend with the patch. If the patch is acceptable I recommend that it be marked as version 1.0.

πŸ‡ΊπŸ‡ΈUnited States bwong

This is essentially the same problem as #15022759 πŸ› the Value is lost with Aggregation Needs review which is for version 8.x. Hopefully I can get the fix I am working on for Drupal 8+ to work with 7.

πŸ‡ΊπŸ‡ΈUnited States bwong

I have not put a diff file together to fix this but I did figure out what is going on. Essentially the system automatically switches to a NumericField. This needs to be prevented. The trick is to keep track of the aggregation within the module and prevent the system from overriding and using the NumericField. It is then up to this module to provide that selection and to implement the selected aggregation function when generating the query.

πŸ‡ΊπŸ‡ΈUnited States bwong

Had to incorporate the changes manually via diff rather than merge as I had made a minor change and was not sure how to do this automatically. Thanks for making the changes.

Production build 0.69.0 2024