Project

General

Profile

Actions

Bug #85068

closed

IpAnonymizationAdditionalFieldProvider causes javscript problem in Scheduler

Added by Sven Juergens over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend JavaScript
Target version:
Start date:
2018-05-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Hi,

Please take a look at the attached gifs first

in the scheduler is a Javascript snippet which write the defaultNumberOfDays in the input Field "tx_scheduler[scheduler_tableGarbageCollection_numberOfDays]"
(see should-be-8.7.13.gif)

to get this information TableGarbageCollectionAdditionalFieldProvider set a Javascript var

  $fieldHtml[] = '<script type="text/javascript">/*<![CDATA[*/<!--';
        $fieldHtml[] = 'var defaultNumberOfDays = ' . json_encode($this->defaultNumberOfDays) . ';';
        $fieldHtml[] = '// -->/*]]>*/</script>';

but IpAnonymizationAdditionalFieldProvider also sets this variable, but empty

  // Add js array for default 'number of days' values
        $fieldHtml[] = '<script type="text/javascript">/*<![CDATA[*/<!--';
        $fieldHtml[] = 'var defaultNumberOfDays = ' . json_encode($this->defaultNumberOfDays) . ';';
        $fieldHtml[] = '// -->/*]]>*/</script>';

the result in html is

<script type="text/javascript">/*<![CDATA[*/<!--
var defaultNumberOfDays = {"sys_log":180,"sys_history":30,"index_stat_search":90,"tx_formhandler_log":180};
// -->/*]]>*/</script></div></div></div>
...
...
...
<script type="text/javascript">/*<![CDATA[*/<!--
var defaultNumberOfDays = [];
// -->/*]]>*/</script></div></div></div>

Files

bug-8.7.14-and-8.7.15.gif (325 KB) bug-8.7.14-and-8.7.15.gif Sven Juergens, 2018-05-23 14:12
should-be-8.7.13.gif (469 KB) should-be-8.7.13.gif Sven Juergens, 2018-05-23 14:13
Actions

Also available in: Atom PDF