Project

General

Profile

Actions

Report As File

Ticket:  https://project.math.uzh.ch/issues/9600

Im ticket besprochen, dass wir datenbank IDs in die report files uebertragen und damit hardcoden.

Ist dies wirklich eine sinnvolle Loeseung? 

Wie waere es, wenn die QFQ report files im tt-content record angegeben werden muessen und der inhalt garnicht in T3 datenbank gespeichert wird?

dann kann man T3 datenbank synchronisieren und daneben Reports mit git mergen. die einzige Verbindung sind dann die file paths, die im tt-content angegeben wurden. 

Ueberlegungen: falls wir Ids nicht in files speichern wollen

Path structure

The directory structure mirrors exactly the typo3 page structure.

Each QFQ tt-content record corresponds to exactly one file located in the directory which is named after the page in which the tt-content record lies.

Problem: The page name might not be unique thus multiple directories with the same name must exist.

Problem: QFQ applications depend on more than the tt-content records:

  • position of tt-content record on page (center/column)
  • order of tt-content records on page
  • page alias of page on which tt-content record is
  • page alias of all other pages

Problem: If someone used the page id or the uid of a tt-content record inside a QFQ report as a link, then this will break.

File and tt-content table synchronization:

Assume we can recognize wheter the file or the report was changed since the last synchronization between the two.

File exists tt-content exists last synch data exists File Changed tt-content Changed QFQ reaction when Report is rendered
X X X     render Report from tt-content record
X X X X   Update tt-content record and render report
X X X   X Write tt-content to file and render report
X X X X X Show an error message to developer with two sip protected links: "overwrite file" and "overwrite database"If one is clicked, the page is reloaded with a respective flag which indicates to QFQ what it should overwrite.
X X   - -  
X     - -  
  X   - -  
      - - never happens

Chalenges:

  • recognize changes since last synchronization efficiently
    • Obvious solution: create table "Sync" and use it to track the last synchronization
      • columns:
        • id
        • recordId
        • recordFingerprint
        • pathFileName
        • fileFingerprint
        • modified
        • created
  • overwrite tt-content without braking the typo3 tt-content history mechanism. 
    • look at how tt-content is edited by the QFQ admin interface in the frontend and copy aproach.
  • scenarios not covered yet:
    • file exists, but not tt-content
    • tt-content exists, but not file
    • both exists but where never synchronized
  • Typo3 does not enforce page pathes to be unique
    • Possible solution: QFQ enforces uniqueness by throwing exception if not satisfied

Updated by Marc Egger over 3 years ago · 3 revisions