Closed
Description
Preconditions (*)
- Magento 2.4-develop
Steps to reproduce (*)
- Create Custom Directive as described in devdocs;
- Add created before directive to any CMS page (
{{lifetime should_bold="1"}}
in my case); - Open cms page with the custom directive;
Actual Result: ✖️ $parameters of method "process($value, array $parameters, ?string $html): string" have a parameter "hould_bold"
✖️ and the parameter was not applied
Expected Result: ✔️ $parameters of method "process($value, array $parameters, ?string $html): string" should have a parameter "should_bold"
✔️ and the parameter must be applied
Sollution
\Magento\Framework\Filter\Template\Tokenizer\Parameter has to use a do-while-loop. not a while loop. Else the first char is ignored because $this->next() set the pointer to the second char before getting the first char.
See: \Magento\Framework\Filter\Template\Tokenizer\Variable. There is used a do-while-loop.
Best regards
Bernd
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.
Type
Projects
Status
Done