Comments

duaelfr’s picture

Status: Needs work » Needs review
StatusFileSize
new3.35 KB

This patch applies on the current 2.x-dev branch
It is very close to #248778-14: Taxonomy diff

duaelfr’s picture

Assigned: duaelfr » Unassigned
duaelfr’s picture

DO NOT USE THESE FILES !

duaelfr’s picture

DO NOT USE THESE FILES !
(I am really tired sorry)

duaelfr’s picture

Finally !
Two patch files fixing a little bug occuring when a field have a cardinality of 1 and is empty.

  • add-file-support-1458814-5.patch applies on the lastest dev version
  • add-file-support-1458814-5-incremental.patch applies on the #1 patch
alan d.’s picture

Massive patch over in #1365750: Generalize API and Integrate with core field types needs some testers. If accepted, this will make this issue a duplicate.

alan d.’s picture

In another task, I'm refactoring the field comparison.

These are two raw outputs based on the minimal comparison and the full comparison for images, files and lists (will cross post this to #1550698: Diff of "select from list" fields shows change in key, not change in value if you want to comment on the list format). Currently the output is controlled by a system variable that defines the defaults.

Selectable components are separated with a semi-colon, but the file name is not configurable.

alan d.’s picture

Version: 7.x-2.x-dev » 7.x-3.0-alpha1
Status: Needs review » Fixed

This should be resolved with the new branch, 7.x-3.0-alpha1 or 7.x-3.0-dev.

This is still alpha, so test carefully before use on a production site and report any issues back to the queues.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ts145nera’s picture

Hi,
thank you your works.
I've a question: old files are accessible also if revision isn't public.
There's a way to deny access to the old files?

alan d.’s picture

@ts145nera
Can you confirm that these are not assessable without diff? The module does run the fields though an access check.

if (field_access('view', $field, $entity_type) || field_access('edit', $field, $entity_type)) {

Note that this check was not present in early 3.x releases, and completely absent from 2.x branch.

ts145nera’s picture

@Alan D.
Thank you for your answer.
If I try without Diff, old files are deleted.
Only with Diff old files are stored.
When I access to the node, all work fine and I can see only last file (public files)
But If I try to access to the old file by the Url, the access is possible.
I set 700 permissions to the directory, but it doesn't work. Some search engine link in their cache system, so it can remember link to the old file (es. Google cache)
There's a way to prevent this behavior?

alan d.’s picture

If I try without Diff, old files are deleted. Only with Diff old files are stored.

With Diff or in general when you save a revision? I'm baffled to understand how Diff would interact with the revision system like this, although you need to save revisions (Drupal core functionality) to get Diff to work comparing revisions.

Are you running private or public file system? Core should block access to revision-only files by default if the user does not have access to the revision itself. If public, then no other solutions don't come to mind at the moment sorry, bar turning off revisioning and thus effectively disabling Diff itself on this content type. :(

ts145nera’s picture

@ Alan D.
I'm really sorry Alan, yesterday I forgot to check "create new revision" when I change attached files.
Also without Diff, if I try to create new revision the problem remain.
I'm running public file system, but core doesn't block file access.
You can reproduce problem following these steps:
1) create content type with file field
2) add node and upload one file (copy link to the file http://...........txt)
3) change node deleting file and add another one checking "create new revision"
4) now you can access to the first uploaded file by the copied link.

alan d.’s picture

If not too late, change to private file system and use "View content revisions" permission to restrict. Good luck!

ts145nera’s picture

Thank you Alan D.
You're right, private file system is the only way to restrict access.
I'll try to change public to private file system.