Details
Description
STEPS TO REPRODUCE
- Delete some attachments
- Go to Drawer > Page Index > Deleted Attachments tab
- Click on 'Deleted on' filter and select 'Yesterday' for ex.
- Click 'X' to permanently delete an attachment
- Observe the XWiki console
EXPECTED RESULTS
No warnings/errors are displayed.
ACTUAL RESULTS
Some warnings are displayed related to deprecated usage of HQL parameters every time a date filter is applied or an attachment is permanently deleted. Stacktrace:
2020-02-21 14:42:15,288 [http://localhost:1210/xwiki/bin/view/XWiki/DeletedAttachments?list=1&xpage=plain&outputSyntax=plain&offset=1&limit=15&reqNo=3&datt.date=1582149600000-1582235999999&&sort=datt.filename&dir=asc] WARN c.x.x.XWiki - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [select datt.id, datt.filename from DeletedAttachment as datt where 1=1 and datt.date between ? and ? order by datt.filename asc] has been converted to [select datt.id, datt.filename from DeletedAttachment as datt where 1=1 and datt.date between ?1 and ?2 order by datt.filename asc] 2020-02-21 14:42:15,299 [http://localhost:1210/xwiki/bin/view/XWiki/DeletedAttachments?list=1&xpage=plain&outputSyntax=plain&offset=1&limit=15&reqNo=3&datt.date=1582149600000-1582235999999&&sort=datt.filename&dir=asc] WARN c.x.x.XWiki - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [select count(*) from DeletedAttachment as datt where 1=1 and datt.date between ? and ? ] has been converted to [select count(*) from DeletedAttachment as datt where 1=1 and datt.date between ?1 and ?2 ] 2020-02-21 14:43:06,065 [http://localhost:1210/xwiki/bin/delattachment/aaa/WebHome/a%20doc%20with%20spaces.txt?trashId=3&form_token=RTSjobdxhQ078rvx8ANjyA&confirm=1&ajax=1] WARN c.x.x.XWiki - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?] has been converted to [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?1] 2020-02-21 14:43:20,628 [http://localhost:1210/xwiki/bin/delattachment/aaa/WebHome/a%20doc%20with%20spaces%202.txt?trashId=4&form_token=RTSjobdxhQ078rvx8ANjyA&confirm=1&ajax=1] WARN c.x.x.XWiki - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?] has been converted to [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?1] 2020-02-21 14:50:55,765 [http://localhost:1210/xwiki/bin/view/XWiki/DeletedAttachments?list=1&xpage=plain&outputSyntax=plain&offset=1&limit=15&reqNo=5&datt.date=1582236000000-1582322399999&&sort=datt.filename&dir=asc] WARN c.x.x.XWiki - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [select datt.id, datt.filename from DeletedAttachment as datt where 1=1 and datt.date between ? and ? order by datt.filename asc] has been converted to [select datt.id, datt.filename from DeletedAttachment as datt where 1=1 and datt.date between ?1 and ?2 order by datt.filename asc] 2020-02-21 14:50:57,562 [http://localhost:1210/xwiki/bin/view/XWiki/DeletedAttachments?list=1&xpage=plain&outputSyntax=plain&offset=1&limit=15&reqNo=5&datt.date=1582236000000-1582322399999&&sort=datt.filename&dir=asc] WARN c.x.x.XWiki - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [select count(*) from DeletedAttachment as datt where 1=1 and datt.date between ? and ? ] has been converted to [select count(*) from DeletedAttachment as datt where 1=1 and datt.date between ?1 and ?2 ] 2020-02-21 14:51:04,486 [http://localhost:1210/xwiki/bin/delattachment/aaa/WebHome/Adresa%20Matrix%20Riot%20ONLINE.txt?trashId=1&form_token=RTSjobdxhQ078rvx8ANjyA&confirm=1&ajax=1] WARN c.x.x.XWiki - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?] has been converted to [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?1]
Reproduced also on XWiki 11.10.4 Snapshot.
Attachments
Issue Links
- is related to
-
XWIKI-17018 Warnings for deprecated usage of parameters on Deleted Pages and Deleted Attachments livetables
- Closed
-
XWIKI-16534 Warnings related to deprecated usage of parameters when accessing WikiManager page
- Closed
-
XWIKI-16536 Convert livetable queries to not use old ? based hql parameters
- Closed
- relates to
-
XWIKI-17072 Warnings for deprecated usage of HQL ordinal parameters when applying a date filter on Deleted Attachments livetable
- Closed