We regularly post updates and new features to our platform and integrations in our changelogs. For our QuantCDN Drupal module (for Drupal 9 and 10), we had a big release last month that has some notable features including being able to see Quant metadata on individual Drupal pages and in admin reports. Let's see what these new features look like.
Drupal 1.6.0 Release
The Quant Drupal 1.6.0 release resolved more than 40 issues!
This release fixed several bugs, particularly for multilingual Drupal websites that want to use our static site generator. Additionally, we improved the module’s UX by adding more help text, documentation, and logging.
A few smaller features were added to support the Workbench Moderation module and improvements to the Quant Purger submodule. The biggest feature added to this release is for viewing Quant metadata.
What is Quant Metadata?
Each URL for your website has metadata stored in Quant such as when it was last modified, the number of revisions, and whether it’s published or not.
Here’s an example of metadata:
{ "global_meta": { "records": [ { "last_modified": "2023-07-20T10:21:11", "meta": { "url": "/about-us", "type": "content", "seq_num": 3, "published": true, "byte_length": 41750, "published_md5": "1476374aafe25fb499729ee7e4505e62", "date_timestamp": 1595240471, "revision_count": 3, "published_revision": 3, "highest_revision_number": 3 } }, ] } }
New Page Info Block
When syncing content between Drupal and your Quant static site, there is a one-to-one relationship between your web pages and assets between both systems. Each static page should reflect the state of your corresponding Drupal page, but sometimes that may not be the case due to incorrect configuration or simply because cron hasn’t run yet to get them in sync. This is site-dependent as there are many ways you can configure your Quant settings.
Rather than logging into your dashboard to see the status of your static page, there is now a page info block that can be displayed within Drupal. If you update to version 1.6.0, it will be enabled automatically.
[UPDATE] You should update to release 1.6.1, so the block does not show up for anonymous users. If that is not possible, just disable the option in your Quant settings until you can.
New “Show page information block” setting in the Quant configuration.
Using the Page Info Block
When this setting is enabled, you’ll see a yellow box above your content that shows the Quant metadata: published, revision count, last updated and last synced. This can be helpful when debugging issues with your static site such as someone says a page is unpublished when it is published within Drupal or vice versa.
For example, if you have unpublished your page, yet the info block shows the content is still published in Quant, first try reloading the page in Drupal to make sure the block is showing the latest information. After that, make sure you have “Track content changes” enabled for Nodes (or whatever entity page you are viewing). Lastly, try running cron and checking your page again. If your content still shows as published in Quant, and it is critical that it’s unpublished, you can log into the Quant Dashboard and manually unpublish it. Normally, mismatches happen due to your module configuration, but you can log an issue if you think there is a bug.
Default location of the Quant page info shown above the content.
Moving the Page Info Block
If, for some reason, you want to move the page info to another location, you can use the Quant Page Info block. First, disable the option on the admin settings page (unless you want the information in two places), and then use Drupal’s Block Layout system to place the block in whatever region you want. Once you have saved your blocks, you may need to clear your site cache for the information to show up in the right place.
Placing the “Quant Page Info” block using the Block Layout system.
The Quant Page Info block showing up in its new region.
Metadata Views Plugin and Reports
The page info block is helpful primarily to check the published status and date of the static version of your Drupal page. For more page metadata, there are now admin reports in the Quant settings shown in tabs under /admin/config/quant/metadata
. There is metadata shown for nodes, taxonomy terms, files and redirects.
These admin reports were created with a new Quant Metadata Views Plugin. With this plugin, you can create your own views and add Quant Metadata to them. By default, the timestamps, published status, and URL are shown, but you can choose from other metadata such as MD5 hash, revision count, and highest revision. These reports can be helpful when auditing to see if the data between Drupal and Quant matches such as for the published status.
New Quant Metadata Views Plugin to add metadata to views.
New Quant Metadata admin report for Nodes.
Feedback welcome!
If you have any questions or have suggestions for making the Drupal module features more useful, contact us and let’s talk!
About QuantCDN
Quant is a global static edge; a CDN & WAF combined with static web hosting. We provide solutions to help make WordPress and Drupal sites static, as well as support for all popular static site generators.