Account created on 27 August 2023, 10 months ago
#

Recent comments

Thanks John.  I'm sure that you are right.  I will experiment with increasing PHP memory for the page in question.

I've worked it out. 

1) Add a new View of content type BBB.  Make it a Block displaying an Unformatted List of Fields.

2) Advanced > Relationship Add > Content Referenced From field_countryName.  Require this relationship.

3) Filter > Content Type.  Add a tick for Content Type AAA (so both AAA and BBB are now ticked). Do not use a relationship.

4) Add Field > add the field that contains the image of the flag from AAA. Relationship = field_countryName:Content.

At this stage the View contains a list of node titles from BBB with the appropriate flag, from AAA, shown beside each.

5) Fields > Remove Title Field

Now the View contains a list of flag images (one for each node in BBB).

6) Advanced > Contextual Filters > Add > Title = ID, Category = Content. Do not use a relationship. Provide a default value, Type = Content ID from URL.

Now the View is empty. This is the desired result (because its URL is not associated with a flag image).

7) Save the View Block.

8) Structure > Content Types > BBB > Manage Display > Default > Layout Builder. Add Block > Lists (Views) > Add the View Block that was created above.

9) Save Layout.

Now open a node of content type BBB.  The image of the appropriate flag, sourced from AAA, is displayed.

Thanks for replying, but - as you suspected - I found a way of doing it using the Drupal UI.

Short version:

1) Create a Chart View AAA for the 1st Content Type.  Get the first data series looking how you want it.

2) From the same View - +Add a Chart Attachment Block BBB

Being very careful to always select "For - This Block", on Block BBB:

3) Change the Filter criteria to Content Type = 2nd Content Type (the source of the 2nd data series that you want to include on the same chart).  This was the key step that I was missing before. Filter criteria points to Content Type. Very flexible, but not where I intuitively looked for it. 

4) Update the Fields and Format settings to use the field names from the 2nd Content Type

5) Then Chart Settings > Parent Display = Chart View AAA.

Now Block BBB should chart only your 2nd data series, but Block AAA (the parent) should chart both data series.

I had to play with this for the best part of an hour before I got it to work. For my first five + attempts the preview just stayed blank. The time that I got it to work I started from a Chart Attachment duplicate of Chart View AAA, then changed one thing at a time in Block BBB, always going back and checking that something was still displaying in the preview. That approach worked. The Chart Attachment feature is unfortunately abstract but very flexible / powerful. It's great, but under-documented.

Turned out I was only one step off having what I wanted.

Edit the View Block which is lower on the page > Advanced > Exposed Form In Block = Yes.  This has the effect of hiding the Exposed Filter for this block.

I've possibly got the same issue. I've got a content type with 16K nodes. I run into problems when I try to aggregate this using View Aggregator Plus. I get a 'failed to load resource : the server responded with a status of 500' error.

Its easiest to describe if I start from what happens if I aggregate using Drupal's core views module.
- Structure > Views > Add View
- Content of type My16KNodes
- Create a page
- Display format Table of Fields
- Items to display 100 <------------ the key field for this issue
- Then create my aggregated view on the Structure > Views > Title / Format / Fields page
The Items to Display controls the number of rows in the display of the aggregated view. I can aggregate 16K nodes, as long as the number of grouped rows in the resulting view doesn't exceed 100 (items to display).

Then I try to do exactly the same with Views Aggregator Plus, except that the Display Format is obviously a Table with aggregation options. VAP doesn't use the Items To Display (in my example set to 100) to control the number of rows in the output. Instead VAP uses the Items To Display to control the number of nodes that it accepts as inputs. VAP successfully takes the first 100 nodes of type My16KNodes, and aggregates those.

Put simply - Structure > Views > Add View > Items to display:
- on core aggregated Views, limits the rows output;
- on Views Aggregator Plus, limits the number of nodes input.

Because I want to use Views Aggregator Plus to display aggregated data describing my 16K nodes, I try the obvious thing and increase the Items To Display to 17000. For both VAP and core Views this results in an Ajax error ('failed to load resource : the server responded with a status of 500'). The maximum value for Items To Display that I can input without getting this error seems to be about 4000. Sometimes 4000 triggers the error, sometimes it doesn't.

For core aggregated Views limiting the output to less than 4000 rows doesn't seem like much of a constraint, but for VAP limiting the input to less than 4000 nodes is a big constraint (for me anyway). VAP is a great tool. It offers features that I'd really like to use. But I need a way to be able to get it to display the results of aggregating 16K+ nodes.

I've worked it out.  In an aggregated View:

- I cannot CHANGE the type of aggregation used after it is initially set. If I try to change away from the first setting (e.g., COUNT to SUM) then I get the ajax error described above; but

- If I choose the aggregation type that I want (e.g., COUNT or SUM) correctly in the first place, then both COUNT and SUM work fine.

If I want to change the type of aggregation from A to B, then I need to delete the field, re-add it, and choose aggregation type B.

Wombat - thanks for taking the time to reply.

Thanks, but I'd already tried that -

It just won't let me change COUNT (Integer Field) to SUM (Integer Field) without throwing an Ajax error. The only aggregation types that work are COUNT and COUNT DISTINCT.  What its doing would make sense (apart from having a terrible error message) if my field wasn't numeric, but it is - its of type Integer.

Thanks Gisle & Jaypan.  I'll switch to using Composer once I'm past my current rush. Tip about checking the composer.json file was also very helpful. Kim

Hmmm - straight after posting I managed to open the .TAR.GZ file using the technique documented in this link -

https://pureinfotech.com/extract-tar-gz-files-windows-10/

The Feeds module readme.txt file states "This module requires no modules outside of Drupal core.", but I couldn't get it to run successfully until after I had also installed Ludwig. Weird.

Is there a way to get into an installed modules readme.txt files from within my Drupal sites Admin UI?

Production build 0.69.0 2024