cfinclude: template not found exception + symbolic link + CF 9.0.1 - coldfusion

I had following directory-structure:
/user1/
/user1/bla.cfm
/index.cfm
and created a directory called users:
/users/
/user1/
/user1/bla.cfm
/index.cfm
I set up a symbolic link (under linux with ln -s) from /user1/ to /users/user1/ and tried to <cfinclude> the bla.cfm which worked good. From index.cfm:
<CFINCLUDE template="users/user1/bla.cfm" />
After some testing I removed the symbolic link (/users/user1/) and moved the real directory /user1/ to /users/user1/. Suddenly the bla.cfm did not let me include and threw a template not found exception.
After setting up the symbolic link from /users/user1/ to /user1/ the <cfinclude> worked again. I cannot reproduce this on our development server!? Any hints how to fix this?
Btw all user-directories (user2, user3, etc.) have a bla.cfm inside - and just 2 are having the problem described above. It seems that those users were active and the bla.cfm was included via the symlink. Are those symlinks and their targets cached somewhere?
EDIT:
I tried already clearing the template-cache in CFAdmin.
Further testing:
from index.cfm:
expandpath("/users/user1/bla.cfm") -> correct path
fileexists(expandpath("/users/user1/bla.cfm")) -> saying "YES"
but:
fileexists(expandpath("users/user1/bla.cfm")) -> saying "NO"

Maybe it's some issue with mappings? In the last include you're using absolute path, where in the first one you're using relative path.
Here are some links about mappings:
http://www.coldfusionmuse.com/index.cfm?mode=entry&entry=8E676EBA-A0EF-5BB2-1461BEA3C00CC076
http://forums.adobe.com/thread/442033
Coldfusion mapping error

You don't specify how you setup a 'symbolic link' - do you mean you created a mapping in CF Administrator? If so, check the neo-runtime.xml file in your /cfusion/lib/ folder and see if has been correctly updated.

Restarting coldfusion server instance fixed the problem.

Related

Creation of the virtual directory failed with error: cannot write configuration file applicationhost.config

I'm just simply trying to open up a VS 2017 project. When I open the solution, I get the following error message:
Creation of the virtual directory http://localhost:58051/failed with the error: Filename: \?\C:\Users\Visual Studio 2017\Projects\Testing\Version 2.0.vs\config\applicationhost.config Error: Cannot write configuration file
I've checked the folders along the file path and they are not encrypted. All the folders along the file path have a black box for the Read Only attribute. When I go to the config folder and clear out the black box for the Read Only attribute and Apply the setting, I find if I exit and go back to the same folder, the black box reappears for the Read Only attribute. I've read that the black box doesn't really mean the Read Only attribute has been turned on. If the Read Only attribute was actually turned on, I should expect to see a check mark instead. However, this doesn't explain why I can't open the solution.
After I click the OK Button to the VS Error message, VS just says the solution is "(unavailable)" in the Solution Explorer.
Any help would be greatly appreciated.
I too had this problem with my project files located on OneDrive. The way I resolved it was I renamed the applicationhost.config file located in the ".vs\config" directory of your root project directory then reloaded the web project. This will create a new applicationhost.config file.
I had the same error message sharing a project between 2 machines via OneDrive and fixed it as follows:
1 - Closed VS.Net
2 - Opened [myappnamefolder].vs\config\applicationhost.config in Notepad
3 - Searched the open file for the filename in my error message (In your case C:\Users\Visual Studio 2017\Projects\Testing\Version 2.0.vs\config\applicationhost.config ).
It was found under system.applicationHost, sites, site name, application path, virtualDirectory - physicalPath
4 - Amended the physicalPath value to point to the valid path of the project's config file as above.
5 - Saved the applicationhost.config file
My paths were different because I had different home user directories on each machine. (User A & User B)
I have resolved this error with this way mention as below:
STEP 1:
Go to on that path
C:\Users\navz\OneDrive\Documents\IISExpress\config
STEP2:
When you reach on this folder "config"
in this folder we can see "applicationhost" file
STEP3:
Close the Visual studio existing project and delete the applicationhost file(see on Step 2 path)
Then open the existing project again, it will be reloaded automatically and work properly.
Had same problem then looked into vs\config\applicationhost.config and it was encrypted. I unencrypted file and solution loaded with no problems.
I've had this problem several times using VS 2017 with Onedrive. Resolved it by renaming the application.config and having VS recreate it. Just as well could have edited line in the file. See the Diff below as an example.
The config file is located in something like C:\Code\MyProject\.vs\config\.
I just encountered this error. I followed the steps in this answer: https://stackoverflow.com/a/50508207/1166163
When I tried to save my changes I realised TFS had marked the file as read-only, preventing VS from updating the value. Removing the read-only attribute fixed the problem.
None of the above worked for me. I ended up deleting and recloning the repo that was giving me problems. It then opened up just fine.
Windows 10 Defender was causing this for me. When I disabled control folder access it worked again. Odd, because it had been working with that setting on for a while.
my drives were different - but the main codebase was shared between the two machines - so on one it was in the d drive - so i mapped the parent subdirectory on the second machine to be the d drive ... which resulted in the same paths then on both ... i just had to open the solution from the d drive on the second machine

Drupal8 Configuration directories error

I've installed Drupal8 locally using Acquia Dev Desktop interface.
I've got error as below in Reports/Status Report:
Configuration directories Not present
Your sites/drupal-8-2-6.dd/settings.php file must define the $config_directories variable as an array containing the names of directories in which configuration files can be found. It must contain a sync key.
I also could not push to Cloud Dev(internet interface) because it shows error as below:
Requirement Problem:
Configuration directories Not present
Your /settings.php file must define the $config_directories variable as an array containing the names of directories in which configuration files can be found. It must contain a sync key.
My setting.php is under ~/Documents/DRUPAL/drupal-8.2.6/sites/default/settings.php
Should I make changings in this file?
What changes need to make to get rid from error?
thanks.
Precise detailed steps for the user6781412 solution at:
https://www.drupal.org/node/2891394
===
#user6781412 : Thanks
I detailed your solution in precise detail for newbies like myself, but this bloody forum keeps regecting it on the grounds that "Your post appears to contain code, blah, blah, blah."
I gave up after about an additional half-hour trying to format my solution for this site, and have instead posted it at the above URL at drupal.org.
You da' one. Peace out.
"All the best; intended."
Christopher James Francis Rodgers
I've solved the problem and fixed error by creating sync dir. outside of my root. So in this case I've created sync.dir under ~/Documents/DRUPAL and left it empty.
Then I've created code that pointing to this dir as below:
$config_directories = array(
// REPLACE THIS PATH for your path
CONFIG_SYNC_DIRECTORY => '~/Documents/DRUPAL/drupal_sync',
);
This fixed error.
Short history of sync directory:
"Sync directory contains configuration files that help move your site from your local development machines to the production servers. In the past, all configuration was contained in the database and moving from development to production was very troublesome".

wsimport is not recognized as internal or external command

I am trying to generate the files using wsimport and i am getting the above error. I have done the following steps:
1) JAVA_HOME -set to C:\Program Files\Java\jre7
2) c:\Desktop\Temp>wsimport http://www.w3schools.com/webservices/tempconvert.asmx?WSDL -extension -keep
running the above command results in error.
I have also tried appending /bin to the JAVA_HOME but it does not remove the error.
You need a JDK, not JRE. XJC is not a part of JRE bin.
JAVA_HOME variable does not include bin:
JAVA_HOME=C:\Programme\Java\jdk1.6.0_29
However PATH should include %JAVA_HOME%\bin.
This is where my jdk is, works for my system:
Go to My computer >> right click and select properties.
On the properties tab select Advanced system settings (Windows 7)
Click enviroment variables
select path and click edit option
add
";C:\Program Files\Java\jdk1.7.0_60\bin"
at the end.
Done.
This fixed my problem:
If you are 100% sure that everything is set-up.Try to close cmd and reopen it. It should start recognizing it.

JFolder: :folder: Path is not a folder. Path:

I'm receiving the following error JFolder: :folder: Path is not a folder. Path: (with no path) when i create a menu item based off a K2 item. Its a fresh install with only k2, Gantry Framework (with throws the same error on install), a template installed, and a few items created...
As you see from the tag its Joomla! version 2.5.14. The PHP allow_url_fopen setting is disabled. This setting must be enabled for the updater to work.
(this is because i'm using Yahoo Small Business and from my understanding they don't allow customization of php settings and i'll never use them again after my year is up).
I've seen the issues on temp and logs and they are both ./logs or ./tmp
The template also looks pretty messed up but works fine on another site i have.
Other than that its all pretty new. Anyone have a work around or fixes for what i'd doing?
Switch to a host that is set up to run Joomla. All of your errors are server configuration related.

Default documents in web.xml not being respected (developer/stand-alone server)

For some reason, when browsing to URL that ends in a folder (ex. //localhost:8500/website/directory/), index.cfm is not loading and instead a 404 error page is returned. I have confirmed that the ...\web-inf\web.xml file is being used by modifying filter-mappings to enable the display of .htm and .txt files. In fact, none of the files in the welcome-file-list section are being used even if they exist which leads me to believe that there is something wrong with this section of the web.xml file.
The web.xml files are as follows:
{install-root}\cfusion\runtime\conf\web.xml
{install-root}\cfusion\wwwroot\web-inf\web.xml
Both files contain the same XML listed below.
<web-app>
...
<welcome-file-list id="WelcomeFileList_1034013110672">
<welcome-file>index.cfm</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.txt</welcome-file>
</welcome-file-list>
...
</web-app>
I have just recently patched to Update 6, but I believe that the problem was always there from the initial install. Please note that this is the development stand-alone server.
Has anyone already solved this or have any ideas on how to proceed other than re-installing CF10 and using IIS?
Late to the party, IMO there are two possible reasons that i can think of for this issue
Either your have additional mapping like "/" in place which is taking over servletcontainer's builtin default servlet who is the one responsible for going to the right root path
your folder name is something which CF already have a mapping for e.g. /flashservices/gateway/, CFFormGateway, cfform-internal, WSRPProducer, JSDebugServlet, flex2gateway
I think sharing your web.xml could have helped pin point the issue here.
I had this issue recently and it was a case-sensitivity issue in Tomcat (despite this being a ColdFusion 10 install on Windows).
My default index.cfm would load when I navigated to http://127.0.0.1 but as soon as I went to http://127.0.0.1/mysite, I got a 404. The folder was named mySite in Windows. As soon as I changed my URL to http://127.0.0.1/mySite it began working.