Skip to content
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

FIX avoid from re-initializing result on nested hook getEntity #27799

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

lvessiller-opendsi
Copy link
Contributor

@lvessiller-opendsi lvessiller-opendsi commented Jan 25, 2024

FIX avoid from re-initializing result on nested hook getEntity

  • when you have a first hook such as "formBuilddocOptions" calling "getEntity()" function
  • then "getEntity()" function executes the hook "hookGetEntity" (nested hook) and results of the previous hook are re-initialized

For example
We have two module : Module 1 and Module 2

  1. Module 1 : hook "formBuilddocOptions" is adding some (using "resPrint" of hook manager object)
  2. Module 2 : hook "formBuilddocOptions" is calling getEntity() and then the global "hookmanager" is re-initialized and "resPrint" value is now empty
  3. So the options before generating a document are lost (resPrint is empty)

Before
image

After
image

@lvessiller-opendsi
Copy link
Contributor Author

@eldy
You're right. It's a better way to resolve this problem of nested hooks.

Could you check why I have this Travis error ?

  • Checking PHP syntax errors (only 1 version to not overload travis and avoid duplicate tests)
  • parallel-lint: command not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants