Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Oct 18, 2025

Summary

  • inject the EverBlockModalDomainService into the module to hydrate admin product modal data, persist translations, and reuse cache invalidation
  • refactor the modal front controller to fetch modal content through the domain service and expose a dedicated ModalDto to the template
  • add the ModalDto class, remove the legacy ObjectModel, and update composer metadata and legacy mappings accordingly

Testing

  • php -l controllers/front/modal.php
  • php -l src/Service/Domain/EverBlockModalDomainService.php
  • php -l src/Dto/ModalDto.php
  • php -l src/Service/Domain/LegacyModelMap.php
  • php -l everblock.php (fails: "Cannot redeclare class Everblock" when linting the module entry point in isolation)

https://chatgpt.com/codex/tasks/task_e_68f3baafd3748322981e31652460700b

@CySSoO CySSoO merged commit 3a4221a into master Oct 18, 2025
0 of 6 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

private function createBaseQueryBuilder(int $shopId): QueryBuilder
{
$queryBuilder = $this->connection->createQueryBuilder();
$queryBuilder
->select(
'modal.id_everblock_modal',
'modal.id_product',
'modal.id_shop',
'modal.file',
'modall.content'
)

P1 Badge Selecting translation column without joining table

The new front controller now calls EverBlockModalDomainService::find() which in turn executes EverBlockModalRepository::findById(). That method relies on createBaseQueryBuilder(), but the base query still selects modall.content even though no join is added in the findById() path. As soon as a modal is fetched by id, the generated SQL references the undefined alias modall, yielding an "Unknown column 'modall.content'" error and the modal cannot be rendered. Either remove modall.content from the base select or add the appropriate join when building the query.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants