0

This behavior started after upgrading our Drupal 7.43 system to 7.56. In the process we also upgraded the Views module to 7.x-3.18 and the File (Field) Path module is at 7.x-1.0.

In the content type field management the File field configuration is using this setting for File Name:

[file:ffp-name-only-original].[file:ffp-extension-original]

As an example the file name sellsheet.pdf is displayed on the content page.

In the files/pdf directory the files and revisions are:

sellsheet.pdf
sellsheet_0.pdf
sellsheet_1.pdf
sellsheet_3.pdf
sellsheet_4.pdf
sellsheet_5.pdf

This file is attached to a view using Rewrite results code of:

<a href="[field_sell_sheet]">Sell Sheet</a>

Which generates a link to sellsheet_5.pdf

When I delete this content on the content page I would expect the link on the view to disappear. It does not, it changes the link to the file sellsheet_2.pdf which did not exist before but does now because when looking the directory the files are:

sellsheet.pdf
sellsheet_0.pdf
sellsheet_1.pdf
sellsheet_2.pdf
sellsheet_3.pdf
sellsheet_4.pdf

This because sellsheet_5.pdf has been renamed to sellsheet_2.pdf.

So the view still provides a link even though it should not.

When I upload a new file in the content edit page the directory of files becomes:

sellsheet.pdf
sellsheet_0.pdf
sellsheet_1.pdf
sellsheet_3.pdf
sellsheet_4.pdf
sellsheet_5.pdf
sellsheet_6.pdf

The new file was uploaded and named sellsheet_5.pdf and sellsheet_2.pdf was renamed to sellsheet_6.pdf.

So when you click on the link on the content editing page it opens sellsheet_5.pdf, but the view link goes to sellsheet_6.pdf.

I'm not sure what is going on but suspect it may have something to do with Drupal not being able to update the database.

There are no errors in watchdog, Apache or MySQL logs.

Has/is anyone else experienced this? I'm assuming it's a File (Field) Path issue.

1 Answer 1

0

I have finally discovered the issue. Even though the node shows a status of published there is actually a draft. Up until the upgrade users were able to publish the content they created using Workbench Moderation. Now after saving an edit to the node the status never changes to draft and will not allow the user to publish the content. The only way the content can be published is by an administrator setting the Moderation status at the bottom of the page and then saving the record.

I have not been able to find a way to correct this issue yet. I will post a separate question that has a clearer description of the issue now that I have one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.