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

history rework #1502

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

bitshiftersgmbh
Copy link
Contributor

@bitshiftersgmbh bitshiftersgmbh commented Apr 24, 2024

complex rework of yform manager history views, both list and details view

  • adding missing and new translations in 4 languages (TODO: pt_br)
  • comparison based on field type (complex diff with <del> and <ins> for text/textarea values)
  • for technical reasons (comparison with prev revision) changed sorting to timestamp ASC
  • details modal view with icons, tooltips (file type) and grouping changes/added/removed/unchanged into accordion panels

@skerbis
Copy link
Contributor

skerbis commented Apr 26, 2024

Bekomme aktuell beim Aufruf einer einfachen Tabelle:

Error: Call to a member function hasValue() on null
File: redaxo/src/addons/yform/plugins/manager/pages/data_history.php
Line: 304

Stacktrace
Function File Line
rex_yform_manager::{closure} redaxo/src/core/lib/util/formatter.php 494
rex_formatter::custom redaxo/src/core/lib/util/formatter.php 31
rex_formatter::format redaxo/src/core/lib/list.php 1147
rex_list->formatValue redaxo/src/core/lib/list.php 526
rex_list->getColumnValue redaxo/src/core/lib/list.php 1328
rex_list->get redaxo/src/addons/yform/plugins/manager/pages/data_history.php 372
include redaxo/src/addons/yform/plugins/manager/lib/yform/manager.php 212
rex_yform_manager->getDataPage redaxo/src/addons/yform/plugins/manager/pages/data_edit.php 20
require redaxo/src/core/lib/packages/package.php 233
rex_package->includeFile redaxo/src/core/lib/be/controller.php 508
rex_be_controller::{closure} redaxo/src/core/lib/util/timer.php 56
rex_timer::measure redaxo/src/core/lib/be/controller.php 490
rex_be_controller::includePath redaxo/src/core/lib/be/controller.php 456
rex_be_controller::includeCurrentPageSubPath redaxo/src/addons/yform/pages/index.php 3
require redaxo/src/core/lib/packages/package.php 233
rex_package->includeFile redaxo/src/core/lib/be/controller.php 508
rex_be_controller::{closure} redaxo/src/core/lib/util/timer.php 56
rex_timer::measure redaxo/src/core/lib/be/controller.php 490
rex_be_controller::includePath redaxo/src/core/lib/be/controller.php 439
rex_be_controller::includeCurrentPage redaxo/src/core/backend.php 253
require redaxo/src/core/boot.php 157
require redaxo/index.php 9
System report (REDAXO 5.17.1, PHP 8.2.18, MariaDB 10.11.7)
REDAXO
Version 5.17.1
PHP
Version 8.2.18
OPcache yes
Xdebug no
Database
Version MariaDB 10.11.7
Character set utf8mb4
Server
OS Linux
SAPI fpm-fcgi
Webserver Apache
Request
Browser Safari/17.4.1
Protocol HTTP/1.0
HTTPS yes
Packages
adminer 2.0.1
articletemplates 1.0.1
be_style 3.4.1
be_style/customizer 3.3.1
be_style/redaxo 3.4.1
bloecks 4.0.2
bloecks/cutncopy 4.0.2
bloecks/dragndrop 4.0.2
cke5 6.1.0
cropper 2.0.3
fa_iconpicker 1.2.0
for_sa11y 4.1.0
forcal 4.0.0
icecoder 3.0.2
install 2.12.1
maintenance 2.9.2
mblock 3.4.13
media_manager 2.16.0
mediapool 2.14.0
metainfo 2.11.0
mform 8.0.0-beta3
minibar 2.4.3
navigation_array 3.0.0
phpmailer 2.13.1
project dev
quick_navigation 8.0.0-dev
redactor 2.4.2
rex_sql_helper 1.0.0-beta1
structure 2.17.1
structure/content 2.17.1
structure/history 2.17.0
terminal 0.0.1
uploader 2.4.2
users 2.11.0
watson 2.3.0
ycom 4.3.0
ycom/auth 4.3.0
ycom/group 4.3.0
ycom/media_auth 4.3.0
yform 4.2.1
yform/email 4.2.1
yform/manager 4.2.1
yform_spam_protection 1.2.4
yrewrite 2.10.0
zip_install 1.4.0

@bitshiftersgmbh
Copy link
Contributor Author

@skerbis guck ich mir Sonntag an, ok? Melde mich ggf. im Slack kommende Woche wenn ich Zuarbeit brauche. 👍🏻

…does not result in an existing dataset

rex stan: more fixes
@bitshiftersgmbh
Copy link
Contributor Author

@skerbis Der Fehler taucht(e) auf, wenn keine oder keine in ein existierendes Dataset aufklösende dataset_id als URL Param übergeben wurde. Ich habe es jetzt (erst einmal) so gelöst, dass dann ein Warning erscheint und die 2 Spalten "ansehen" und "Vergleich Änderungen mit aktueller Version" dann nicht ausgegeben werden. Check mal bitte ...

@skerbis
Copy link
Contributor

skerbis commented Apr 29, 2024

Super. 👍🏻

'</a>
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<script>
Copy link
Member

Choose a reason for hiding this comment

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

Hier müsste noch nonce="' . rex_response::getNonce() . '" noch rein, aber lieber noch, wenn das ausgelagert wird, in die yform js Dateien, oder ein eigenes für historie anlegen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ich leg ne .js an

$content .= '
</div>
<div class="modal-footer">
<a href="index.php?page=yform/manager/data_edit?' . $restoreUrl . '" class="btn btn-warning" onclick="return confirm(\'' . rex_i18n::msg('yform_history_restore_confirm') . '\')">' .
Copy link
Member

Choose a reason for hiding this comment

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

kein onclick bitte, sondern js in Dateien auslagern. CSP macht da sonst Probleme

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wird gemacht

@dergel
Copy link
Member

dergel commented May 20, 2024

finde ich ziemlich cool :)

Beispielaufruf bei einem Datensatz:

Warning: Undefined array key "mysinglewidget" in [redaxo/src/addons/yform/plugins/manager/pages/data_history.php] on line 365
Warning: Undefined array key "mymultiplewidget" in [redaxo/src/addons/yform/plugins/manager/pages/data_history.php] on line 365
Warning: Undefined array key "group_id" in [redaxo/src/addons/yform/plugins/manager/pages/data_history.php] on line 365
Warning: Undefined array key "pool" in [redaxo/src/addons/yform/plugins/manager/pages/data_history.php] on line 365
Warning: Undefined array key "media_single" in [redaxo/src/addons/yform/plugins/manager/pages/data_history.php] on line 365
Warning: Undefined array key "media_multiple" in [redaxo/src/addons/yform/plugins/manager/pages/data_history.php] on line 365

und bei einem DIFF Aufruf

Warning: Undefined array key "deleted" in [redaxo/src/addons/yform/plugins/manager/fragments/yform/manager/history.diff.php] on line 65
Warning: Undefined array key "count" in [redaxo/src/addons/yform/plugins/manager/fragments/yform/manager/history.diff.php] on line 65
Warning: Undefined array key "rows" in [redaxo/src/addons/yform/plugins/manager/fragments/yform/manager/history.diff.php] on line 120
Warning: Undefined array key "icon" in [redaxo/src/addons/yform/plugins/manager/fragments/yform/manager/history.diff.php] on line 165

Irgendwie geht die Historysuche nicht.

@bitshiftersgmbh
Copy link
Contributor Author

@dergel check ich alles Ende der Woche, maybe erst Anfang kommende ... 🙃

@bitshiftersgmbh
Copy link
Contributor Author

@dergel

Beispielaufruf bei einem Datensatz:

Kannst du mir hier n Abzug organisieren (leere Table + zugehörige History-Daten), bitte?

und bei einem DIFF Aufruf

ist behoben (Naming Fehler, Rest Folgefehler)

@bitshiftersgmbh
Copy link
Contributor Author

@skerbis guck ich mir Sonntag an, ok? Melde mich ggf. im Slack kommende Woche wenn ich Zuarbeit brauche. 👍🏻

Ach ich bin doof. Es gibt noch diesen "Historie" Button oben. Da wird natürlich keine ID übergeben. Ich bin immer nur über den Button im Funktionen-Menubutton gegangen (also pro Datensatz).

Peter Schulze added 2 commits June 11, 2024 17:04
now old history is present when table history is opened and new more functional history on dataset specific history
+ bringing back search
+ marker for current dataset in dataset specific mode
+ added css
+ outsourced js
$prevHistoryDataset = $historyDatasets[$rev - 1]['values'];

foreach ($historyDataset as $field => $value) {
if ('' . $historyDataset[$field] !== '' . $prevHistoryDataset[$field]) {
Copy link
Member

Choose a reason for hiding this comment

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

Es gibt hier undefined array bei mir. das müsste man wohl noch abfangen


$list = rex_list::factory($listQuery, defaultSort: [
'timestamp' => 'asc',
Copy link
Member

Choose a reason for hiding this comment

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

lieber desc, dann hat man immer die neuesten oben und kann direkt vergleichen, das war aber vorher schon "falsch" :)

@dergel
Copy link
Member

dergel commented Jun 20, 2024

wie besprochen gibt noch die Problematik, dass man hier davon ausgeht, dass alle Einträge in einer Liste sind und es daher beim Paging nicht 100%ig funktioniert. Deswegen ist eine Sortierung bisher noch nicht absteigend möglich

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.

None yet

3 participants