Skip to main content
gghordijk
Participant
December 5, 2014
Answered

Strange behaviour cfinclude with CF11 and Yosemite

  • December 5, 2014
  • 2 replies
  • 2154 views

Hello,

I have a strange problem with my includes, if i save my file with changes, CF can't find them anymore.

Example:

<cfinclude template="views/file.cfm">

Is working fine, when i change something and save file.cfm, I receive the following error 'Could not find the included template views/file.cfm.' which is strange, because the filename and location did not change.

Changing the the cfinclude and the filename into 'file1.cfm' does work. Which made me think it had something to do with caching, but clearing the cache and restarting CF did not work.

Do anyone have an idea?

Thanks,

G.

Running

OSX 10.10

CF 11 Upd 2. Dev

This topic has been closed for replies.
Correct answer gghordijk

It took me almost half a day...

The clear-cache-buttons did not do the job, but when I unchecked ' ' and restarted CF the problem was solved.

2 replies

Participating Frequently
November 29, 2017

Hello G,

   I recently ran into this same issue on RHEL 7 with CF2016.

  

   The issue was the ownership of the compiled class files stored in wwwroot/WEB-INF/cfclasses had been set to root:root during the last hotfix I applied.

  

   A restart of the instance caused everything to work great since the trusted cache has not warmed up - however, as soon as I clear the template cache - bam, missing include files...

  

   In my cfadmin settings I have "Trusted Cache" and "Save class files" options enabled.

  

   If Trusted Cache is unchecked - the behavior goes away with new Class files being generated after clearing template cache if they are not found in cfclasses.

  

   The better solution however IMHO is to just fix the file permissions.

  

   Adobe really should be throwing a better error than the filesystem include is missing.  I will be filing a bug report for cf2016.

  

~J

Charlie Arehart
Community Expert
Community Expert
March 1, 2019

Thanks, J, for that clarification. Very helpful to seemingly explain what was amiss for G and Nando, (a bug in a hot fix, changing permissions on the files in cfclasses).

I see your reply here was from 2017  while theirs were in 2014-15. I'd love to hear if they'd noticed and confirmed this.

I realize they may have just left things with "save class files" off and never looked back. But it would see to counter the assertion that this was a fault or indictment of that option. Instead  it was just a factor in the observed error, not seemingly the root cause.

But I'd love to understand more, if anyone ever did or does investigate further.

/Charlie (troubleshooter, carehart. org)
gghordijk
gghordijkAuthorCorrect answer
Participant
December 5, 2014

It took me almost half a day...

The clear-cache-buttons did not do the job, but when I unchecked ' ' and restarted CF the problem was solved.

BKBK
Community Expert
Community Expert
December 7, 2014

Thanks for sharing your finding.