t3n / neos-debug

Adds a debug panel to your Neos CMS website
MIT License
30 stars 16 forks source link

Caching information missing for uncached segments #165

Open ghost opened 2 years ago

ghost commented 2 years ago

Caching information is only collected when the entryIdentifier contains a "format = 'html'", uncached elements do not contain a 'format' in the entryIdentifier, this is only mandatory for 'cached' or 'dynamic'.

Offending lines:

// Add debug data only to html output
$segmentFormat = $info['entryIdentifier']['format'] ?? null;

if ($segmentFormat !== 'html') {
    return $segment;
}

See commit: https://github.com/t3n/neos-debug/commit/b46cc519644fde67687019603d08677a6d963a7d

Sebobo commented 1 year ago

Do you already have an idea how to solve this better?

freesh commented 1 year ago

Im wondering why uncached shouldn't have an identifier too.

Sebobo commented 1 year ago

What would be the use?

And we cannot add the debug data if we don't know what kind of data is returned. I'm sure there is a good way to solve this, but I haven't had the incentive yet to investigate. So any outside input would be great.