Jacek Cachro

From MaRDI portal
  1. Template:Person — change to single `buildTableAndChart` invoke (Option A)
    • Purpose:** `Template:Person` used to call `fetchData` **twice** per page (once for the table via `buildTableFromSparql`, once for the chart via `buildChartFromSparql`), firing the same heavy SPARQL query 2×. With the refactored `Module:PersonResearchOutcomesList`, a single `buildTableAndChart` invoke calls `fetchData` **once** and returns both cards' full HTML (two-card layout preserved byte-for-byte).
    • Only SECTION 2 and SECTION 3 change.** The rest of the template (badges, metadata, footer) is untouched.

---

    1. Before (current)

```wikitext

List of research outcomes

This list is not complete and representing at the moment only items from zbMATH Open and arXiv. We are working on additional sources - please check back here soon!

PublicationDate of PublicationType
On Cartwright's models for EPR
Studies in History and Philosophy of Science. Part B. Studies in History and Philosophy of Modern Physics
2011-10-15Paper


Research outcomes over time

```

    1. After

```wikitext Lua error in Module:PersonResearchOutcomesList_v2 at line 336: attempt to index local 'w' (a nil value). ```

> **Pagination (Option A):** the second arg `1` passes the `?page=N` URL parameter (default 1) into the module, which paginates the **table** in steps of 100. `#urlget` works in template wikitext (magic word registered) but **not** via Lua's `callParserFunction` ("function urlget was not found") — hence it must be passed from the template, not read inside the module. The **chart** stays complete (built from the full `fetchWorkList`, 0 entity reads).

---

    1. Notes

- The **module** now owns the `.pub-section` wrappers, the section titles ("List of research outcomes", "Research outcomes over time"), the `person-notice`, and the `


` separator between the two cards — reproduced exactly as the old template emitted them (verified from baseline HTML). - The single invoke replaces **both** `

` blocks; nothing else in the template changes.

- If the module is deployed but the template is **not** changed, the page still renders correctly via the legacy `buildTableFromSparql`/`buildChartFromSparql` functions (backward compatible) — it just still fires 2 queries. **The optimization is only active once this template change is applied.**

---

    1. Verification

After applying this change + purge + cache-bust: - **person1** (421 works), **person2** (177), **person3** (140): table + chart must render **identically** (two-card layout preserved). - SPARQL endpoint log should show **1** `fetchData` query per render instead of **2**. - Diff extracted article body against `examples/person1_rajagopal.html`, `person2_hintermueller.html`, `person3_joswig.html`; expect byte-identical content.

---

    1. Appendix — Full template (before & after)
      1. Appendix A: Full `Template:Person` (BEFORE — current, two invokes)

```wikitext



List of research outcomes

This list is not complete and representing at the moment only items from zbMATH Open and arXiv. We are working on additional sources - please check back here soon!

PublicationDate of PublicationType
On Cartwright's models for EPR
Studies in History and Philosophy of Science. Part B. Studies in History and Philosophy of Modern Physics
2011-10-15Paper


Research outcomes over time


This page was built for person: Jacek Cachro


```

      1. Appendix B: Full `Template:Person` (AFTER — single invoke)

```wikitext



List of research outcomes

This list is not complete and representing at the moment only items from zbMATH Open and arXiv. We are working on additional sources - please check back here soon!

PublicationDate of PublicationType
On Cartwright's models for EPR
Studies in History and Philosophy of Science. Part B. Studies in History and Philosophy of Modern Physics
2011-10-15Paper


Research outcomes over time


This page was built for person: Jacek Cachro


```