VTL file edit only takes one change

35 views
Skip to first unread message

Ivan

unread,
Oct 1, 2024, 9:12:02 AMOct 1
to dotCMS User Group
When editing a VTL file, I can only edit one time. All consecutive edits do not reflect the changes on the page. 

To reproduce:
- On the demo site, go to TravelBot index page, roll over the content, click the <> and select travelbot.vtl to open it.
- Click the Edit button
- Add a new text at line 1, let's type Test, save it. Lock for Editing. Save.
- Go to the Travelbot index page to preview. The Test line shows.
- Edit it again and change the first line to something else. Save it. Lock for Editing. Save.
- The index page still has the first edit only.
- The only way to apply the consecutive changes is to Publish the VTL.

Thanks,
Ivan

Mark Pitely

unread,
Oct 1, 2024, 9:24:46 AMOct 1
to dot...@googlegroups.com
I think that is kind of by design, and also just the nature of a mature web. All sorts of things cache at the server and browser level. Tiny incremental changes are not going to get pushed unless you force them or are patient. 
VTL files, in particular, are heavily cached in the system. You can try loading the page with ?dotcache=refresh or go to the Maintenance page and flush the VTL cache. 
You can also try setting the page cache to 0, as it defaults to 10 minutes, that still catches me when I am in rapid development.

Mark Pitely
Albright College

--
http://www.dotcms.com - Open Source headless/hybrid CMS
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/a7d6b4ae-252e-4416-8588-396d01f82debn%40googlegroups.com.

Ivan

unread,
Oct 1, 2024, 11:01:08 AMOct 1
to dotCMS User Group
Caching makes sense for published content. But when I am developing and saving (not publishing,) I am making tons of tiny incremental changes and when I click the save button, I assume that I will see the result of these changes. It's just a little counter intuitive to me. Going to the Maintenance page and flushing the cache after each change seems like an overkill.

Thanks,
Ivan

Mark Pitely

unread,
Oct 1, 2024, 11:19:46 AMOct 1
to dot...@googlegroups.com
I agree with you on the frustration! I've made many errors because my last change didn't actually happen yet.  I've definitely put in a version counter for my own sanity.
I just don't think it is a flaw with dotCMS, but rather a side effect of some very important speed concessions. 
Maybe try appending to your parse? This works well with CSS files and the like (although you can get the file timestamp to make this work best) - I just can't guarantee it would trick the aggressive caching. 
$dotparse("/path/to/my.vtl?cachebuster=$math.getRandom(1,100000)")
##REMOVE AFTER DEVELOPMENT  


M

Reply all
Reply to author
Forward
0 new messages