# Error while evaluating velocity template changesdoc.vm on xwiki 9.11.4

**URL:** <https://forum.xwiki.org/t/error-while-evaluating-velocity-template-changesdoc-vm-on-xwiki-9-11-4/3864>\
**Category:** Help / Discuss\
**Created:** [November 5, 2018, 10:32am UTC](https://forum.xwiki.org/t/error-while-evaluating-velocity-template-changesdoc-vm-on-xwiki-9-11-4/3864 "2018-11-05T10:32:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pbas](https://forum.xwiki.org/user_avatar/forum.xwiki.org/pbas/32/15_2.png) [@Pbas](https://forum.xwiki.org/u/Pbas)\
**Post date:** [November 5, 2018, 10:32am UTC](https://forum.xwiki.org/t/error-while-evaluating-velocity-template-changesdoc-vm-on-xwiki-9-11-4/3864/1 "2018-11-05T10:32:52Z")

</div>

Hello,  
I have an issue with xwiki 9.11.4.  
I have a page with multiple attachments. I deletet one and checking page history displayed this error message:  
“Error while evaluating velocity template changesdoc.vm”

```auto
 at 95:/skins/flamingo/view.vm[line 111, column 38]
...
	... 153 more
Caused by: com.xpn.xwiki.XWikiException: Error number 3002 in 3: The attachment could not be found in the filesystem attachment store (/xxx/data_xwiki/storage/xwiki/Encyclop%C3%A9die/Outils+du+g%C3%A9nie+logiciel/Le+DevOps+au+CPII/WebHome/~this/attachments/agilite_si.svg/agilite_si.svg).

```

I use these xwiki settings:

```auto
#-# The attachment storage. [Since 3.4M1] default is hibernate.
xwiki.store.attachment.hint=file
#-# The attachment versioning storage. Use 'void' to disable attachment versioning. [Since 3.4M1] default is hibernate.
xwiki.store.attachment.versioning.hint=file
#-# [Since 9.9RC1] The default attachment content recycle bin storage. Default is hibernate.
#-# This property is only taken into account when deleting an attachment and has no effect on already deleted documents.
xwiki.store.attachment.recyclebin.content.hint=file
#-# 

```

Thxs  
Pascal B

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [November 5, 2018, 12:39pm UTC](https://forum.xwiki.org/t/error-while-evaluating-velocity-template-changesdoc-vm-on-xwiki-9-11-4/3864/2 "2018-11-05T12:39:56Z")

</div>

According to the error the attachment `agilite_si.svg` from the document `Encyclopédie.Outils du génie logiciel.Le DevOps au CPII.WebHome` has been saved as a filesystem attachment at some point then vanished from the hard drive for some reason. I would suggest you to check if that file is there or not (maybe it’s a right issue) and if it’s not in a different place (some upgrade migration problem if it’s an old attachment).

> [@Pbas](#):
>
> I use these xwiki settings:

Since 9.5 the store in which the attachment content is located is indicated in the attachment metadata so the configuration does not have any impact on it (the configuration is only use for new attachments).

---

<div class="post-metadata">

**Author:** ![Pbas](https://forum.xwiki.org/user_avatar/forum.xwiki.org/pbas/32/15_2.png) [@Pbas](https://forum.xwiki.org/u/Pbas)\
**Post date:** [November 5, 2018, 1:33pm UTC](https://forum.xwiki.org/t/error-while-evaluating-velocity-template-changesdoc-vm-on-xwiki-9-11-4/3864/3 "2018-11-05T13:33:42Z")

</div>

I checked and reproduce this issue because I could come back at old document version.  
When I delete the attachment from xwiki and try click on “compare” 2 versions, "“Error while evaluating velocity template changesdoc.vm” are displayed.

When I delete the attachement, file is moved to `~this/deleted-attachments/` directory but “compare” 2 versions feature displayed error because xwiki try to look in `~this/attachments/agilite_si.svg`

Here file emplacement before file deletion:

```auto
# locate agilite_si.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/attachments/agilite_si.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/attachments/agilite_si.svg/agilite_si.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/attachments/agilite_si.svg/agilite_si~v1.1.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/attachments/agilite_si.svg/agilite_si~v1.2.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/attachments/agilite_si.svg/~METADATA.xml
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17838
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17838/agilite_si.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17838/agilite_si~v1.1.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17838/~DELETED_ATTACH_METADATA.xml
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17838/~METADATA.xml

```

Then I delete `agilite_si.svg` on xwiki, and history display `"Effacement de l'image agilite_si.svg"`. Then I select 2 version and click on compare:  
=\> Caused by: com.xpn.xwiki.XWikiException: Error number 3002 in 3: The attachment could not be found in the filesystem attachment store (xxxx/Le+DevOps+au+CPII/WebHome/~this/attachments/agilite\_si.svg/agilite\_si.svg).

```auto
# updatedb
# locate agilite_si.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/attachments/agilite_si.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17838
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17847
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17838/agilite_si.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17838/agilite_si~v1.1.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17838/~DELETED_ATTACH_METADATA.xml
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17838/~METADATA.xml
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17847/agilite_si.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17847/agilite_si~v1.1.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17847/agilite_si~v1.2.svg
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17847/~DELETED_ATTACH_METADATA.xml
xxxx/Le+DevOps+au+CPII/WebHome/~this/deleted-attachments/agilite_si.svg-id17847/~METADATA.xml

```

Compare feature must displayed sort of “agilite\_si.svg file is removed”, isn’t it?

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [November 5, 2018, 2:04pm UTC](https://forum.xwiki.org/t/error-while-evaluating-velocity-template-changesdoc-vm-on-xwiki-9-11-4/3864/4 "2018-11-05T14:04:45Z")

</div>

Yes the issue you have seems to be more a bug in the code which load a previous revision of a document not properly taking into account attachment which might not be there anymore. Would be great if you could create an issue on [http://jira.xwiki.org/](http://jira.xwiki.org/).

---

<div class="post-metadata">

**Author:** ![Pbas](https://forum.xwiki.org/user_avatar/forum.xwiki.org/pbas/32/15_2.png) [@Pbas](https://forum.xwiki.org/u/Pbas)\
**Post date:** [November 5, 2018, 2:28pm UTC](https://forum.xwiki.org/t/error-while-evaluating-velocity-template-changesdoc-vm-on-xwiki-9-11-4/3864/5 "2018-11-05T14:28:41Z")

</div>

Here: [Loading...](https://jira.xwiki.org/browse/XWIKI-15805)

Thanks

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [November 5, 2018, 2:30pm UTC](https://forum.xwiki.org/t/error-while-evaluating-velocity-template-changesdoc-vm-on-xwiki-9-11-4/3864/6 "2018-11-05T14:30:46Z")

</div>

Thanks !
