Skip to content

Fix profiler tab with new content structure #7999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 16, 2025

Conversation

mamazu
Copy link
Contributor

@mamazu mamazu commented Jun 7, 2025

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets -
Related issues/PRs -
License MIT
Documentation PR -

What's in this PR?

Updating the profiler bar to use the new content entity.

Why?

Otherwise the profiler bar will just be empty.

{{ self.table_row('class', collector.data('structure').objectClass) }}
{{ self.table_row('path', collector.data('structure').path) }}
{{ self.table_row('nodeType', collector.data('structure').nodeType) }}
{{ self.table_row('internal', collector.data('structure').internal ? 'yes' : 'no') }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there already something like "internal" in the new system?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this is still missing 😞

@mamazu mamazu force-pushed the fixing_profiler branch 4 times, most recently from f60653a to d2d35c0 Compare June 8, 2025 00:46
@mamazu
Copy link
Contributor Author

mamazu commented Jun 26, 2025

@Prokyonn You're the expert on the new content structure. Can you have a look at this and tell me if this migration is correct?

$structureObject = $params['structure'];
if ($request->attributes->has('object')) {
$object = $request->attributes->get('object');
if ($object instanceof PageDimensionContent) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make it more flexible, so that it works also for custom content-bundle entities.

So we should check the interfaces individually, e.g.
instanceof WorkflowInterface --> getWorkflowPublished
instanceof ShadowInterface --> shadowLocales
instanceof WebspaceInterface --> webspace
instanceof TemplateInterface --> template
....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes makes sense. I did that. Can you check if it's modular enough?

@mamazu mamazu force-pushed the fixing_profiler branch 3 times, most recently from 5843427 to af31254 Compare July 2, 2025 08:42
@mamazu mamazu force-pushed the fixing_profiler branch 3 times, most recently from 1e6aa85 to a701d8f Compare July 3, 2025 08:01
@mamazu mamazu force-pushed the fixing_profiler branch from a701d8f to 161dd27 Compare July 3, 2025 08:18
@alexander-schranz alexander-schranz changed the title Fixing profiler tab with new content structure Fix profiler tab with new content structure Jul 16, 2025
@alexander-schranz alexander-schranz added the Bug Error or unexpected behavior of already existing functionality label Jul 16, 2025
@alexander-schranz alexander-schranz merged commit ef683f6 into sulu:3.0 Jul 16, 2025
9 checks passed
@alexander-schranz
Copy link
Member

@mamazu Thank you!

@mamazu mamazu deleted the fixing_profiler branch July 16, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behavior of already existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants