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
[3.6][WIP] Changelog fixes / touch-ups #7336
base: 3.6
Are you sure you want to change the base?
Conversation
- Use 'contenttypeslug' to display contenttype correctly - Remove unused column "Editor's Comment" - Ignore whitespace for fields with text - Handle repeaters
app/view/twig/changelog/_blocks.twig
Outdated
</td> | ||
<td class="change-log-item"> | ||
{{ field.after.render }} | ||
{# {{ field.after.render }} #} | ||
{{ dump(field.after.render)}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Erm … you sure about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, that's part of the WIP. It's there so it won't break on Repeaters/Blocks. I need to work on that.
src/Controller/Async/General.php
Outdated
$c->get('/changelog/{contenttype}/{contentid}', 'changeLogRecord') | ||
->value('contenttype', '') | ||
$c->get('/changelog/{contenttypeslug}/{contentid}', 'changeLogRecord') | ||
->value('contenttypeslug', '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BC break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come? It's only used in one place, and i'm not actually changing what's passed in, just what's done with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It changes the router signature
src/Storage/Entity/LogChange.php
Outdated
'address' => isset($before['address']) ? : '', | ||
'latitude' => isset($before['latitude']) ? $before['latitude'] : '', | ||
'longitude' => isset($before['longitude']) ? $before['longitude'] : '', | ||
'formatted_address' => isset($before['formatted_address']) ? $before['formatted_address'] : '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this should be in a Bag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider it done.
src/Storage/Entity/LogChange.php
Outdated
'latitude' => $before['latitude'], | ||
'longitude' => $before['longitude'], | ||
'formatted_address' => $before['formatted_address'], | ||
'address' => isset($before['address']) ? : '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt it be isset($before['address']) ?$before['address'] : '', ?
30e1e3e
to
10e2c7f
Compare
|
||
$result = []; | ||
|
||
foreach($combinedkeys as $key) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected 1 space after FOREACH keyword; 0 found
bb5b5cc
to
4e18e1f
Compare
Oh, and the target is changed from |
Somehow it doesn't show the proper before and after changes for blocks and repeaters; I always get the same values left and right: Edit: 2018-03-12 It's really weird what's going on. Sometimes it shows both the old values, and somtimes both the new ones. With repeaters/blocks, you always get to see those items, regardless of whether they have changed or not. Also taxonomy and relation are always showing up. Note: It is because there is actually only 1 RepeatingFieldCollection, if it exists, it will start (lazily) fetch the same values from the database. |
This issue has been automatically marked as stale because it has not had recent activity. Maybe this issue has been fixed in a recent release, or perhaps it is not affecting a lot of people? |
Still needs more investigation [and still a useful feature to have]. Could be fixed by serializing the before record/values (iterate over all values in lazy items)? |
Yes, should absolutely keep this.. I've put it on hold, to fix up after #7291 has landed, because then we can fix it properly :-) |
4e18e1f
to
0c9b0d3
Compare
WIP: I'll need to make sure changes in repeaters/blocks are logged.