Skip to content

\Magento\Framework\Filter\Template\Tokenizer\Parameter #29185

Closed
@bernd-reindl

Description

@bernd-reindl

Preconditions (*)

  1. Magento 2.4-develop

Steps to reproduce (*)

  1. Create Custom Directive as described in devdocs;
  2. Add created before directive to any CMS page ( {{lifetime should_bold="1"}} in my case);
  3. Open cms page with the custom directive;

Actual Result: ✖️ $parameters of method "process($value, array $parameters, ?string $html): string" have a parameter "hould_bold"

2020-09-16_13-22

✖️ and the parameter was not applied

2020-09-16_13-25

Expected Result: ✔️ $parameters of method "process($value, array $parameters, ?string $html): string" should have a parameter "should_bold"

2020-09-16_13-29

✔️ and the parameter must be applied

2020-09-16_13-30

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

Component: Framework/FilterFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions