Script references inserted in the header - coldfusion

I inherited an older CF site and trying to move it to a different server. There's a problem with the scripts references in the header. They are not accessible and I get a 404 error when trying to navigate to them.
I searched through all my code to find where these scripts could be included, but to no avail.
Does ColdFusion insert references like these automatically or am I missing some source code?

When using ColdFusion tags that require javascript, the javascript source files will be automatically added to the <head> element of your page. This includes <cfform> <cfinput> as well as other non-form related tags, like <cfgrid> and <cfgraph>.
These source files can be found in either the ColdFusion install directory, or it's also possible that the CF installer added them to your web root folder, which would be install-dependent. Depending on your install, a mapping may have been made in your web server to the cf_scripts folder, which would give your app access to those files.
As an aside, I personally avoid using coldfusion tags that inject javascript. I prefer to have complete control over the javascript libs that I use, and I don't like to rely on ColdFusion to release bug fixes, add enhancements, or maintain compatibility.

Related

Can a MediaWiki site running on Apache Tomcat be transferred to SharePoint 2013?

I have a requirement to transfer an internal media wiki site which is running on Cent OS server, Apache tomcat webserver to Sharepoint 2013.
Is it possible to migrate if yes how to proceed with that?
In general, the answer is no, unless your MediaWiki system contains only trivially basic articles.
MediaWiki and SharePoint are completely different products. They are not compatible in any special way. MediaWiki is a wiki with hundreds of features and behaviors that do not exist in SharePoint, not even in SharePoint's wiki product. Examples are:
Transclusion
A thousand configuration variables
Many extensions (plugins) that affect the content
Now, if your wiki content is completely trivial and you don't care about any of MediaWiki's rich features, you can dump all your articles to HTML files (say, using wget or similar) and try to import them into SharePoint somehow. You'll still need to handle embedded images (anything in the File: namespace) specially, however. Your HTML files will contain links to the images, and you'll need to change those links to point to the images' new location in SharePoint.
Alternatively, if you're running SharePoint in house (i.e., not as SaaS) on a Windows server, you could install MediaWiki on that server and pretend it's part of SharePoint. :-)
On hearing your question, I can't help but wonder what you're trying to accomplish. Does somebody in your organization just not like MediaWiki (or Linux)? Maybe they don't understand MediaWiki. (That's likely, if they think it can be migrated into SharePoint.) Anyway, good luck!

Ember.js prevent Google Maps API from loading multiple times

Working with two separate Google maps addons ember-g-map and ember-place-autocomplete which causes this error:
You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
Makes sense, since my index.html page now has multiple scripts loaded in.
Anyone know how Ember devs normally deal with this kind of problem?
Ideally the addon author should provide a config option to allow the consumer to include or exclude the Google Maps library. I just submitted a PR to ember-place-autocomplete that does just that. Once the PR gets merged you can use that, or use my forked version.
As an alternative to ember-g-map you might consider using ember-leaflet with the ember-leaflet-google-tile-layer addon. Ember-leaflet seems to be the main mapping addon for Ember and it does give the option to exclude the Google maps library.

Setting up RoadKill

I am trying to setup a internal wiki site for project documentation project. I am using roadkill because I have a IIS server and a .net environment.
So the installation instructions aren't much. Unzip the files onto a site directory. Navigate to http://arwiki
Should be that simple, however, I get an error about directory browsing and it looks like there is no MVC mapping in Global.asax. It points to a internal dll so it is hard to determine what I did wrong?
Has anyone setup Roadkill and know what I did incorrectly?
Also there is no tag for roadkill
You can ask for help on the issues board -
https://bitbucket.org/yetanotherchris/roadkill/issues?status=new&status=open
However I can tell you that the problem is most likely that you don't have MVC installed on IIS (if it's Windows Server 2008). You might also need to enable ISAPI filters, they can be turned off.
The ASP.NET web installer contains the MVC bits you need, although Roadkill does come bundled with these.

Coldfusion Server Standalone server displaying source code

I needed to install Coldfusion 8 on my local Windows 7 PC, to do some testing. I took the easy route and installed the Standalone server, which included a built in web server. I didn't really need a fully fledged web server, just needed to test.
So after some time of Coldfusion working fine. It started displaying the source code of the page. In other words, Coldfusion was not parsing the page. Merely displaying the source code.
I've worked out that the following line will make the page display source code
<?xml version="1.0" encoding="utf-16"?>
Even if I remove this line from the source code, the source code is still displayed. So I have to make another .cfm file with all the code except the above line, for it to run.
My question is, how do I clear the Coldfusion Standalone Web Server's cache? I've tried the usual restarting of Coldfusion to no avail.
Update: I eventually used a workaround of just renaming the files ie: testing1.cfm, testing2.cfm. For anyone else getting this issue, just use a standalone web server like Apache.
Have you tried restarting ColdFusion?
Have you tried clearing the cache in your browser?
For what it is worth, I prefer to use a web server even when doing development. I have found that using the CF web server and having all my projects under the CF web root can lead to pathing issues in production.
Not sure if you have already fixed this issue but there is an option in the ColdFusion administrator under the Settings > Caching option. At the bottom is a button named Clear Template Cache Now. Clicking that button will empty (remove) any templates that ColdFusion has cached. The next request to that template will force ColdFusion to recompile it if it has been modified.

Is there a way to bind my flex builder to my django application

I am trying to create simple flex application, which uses django as a back-end part. Have a question:
Usually when I run my application Flex Builder creates a file in a directory on my local PC and then opens a browser and points to it. Everything was fine, but when I decided to link django server to flex applications via xml data providers I started to get security errors. (Related to absence of crossdomain.xml). When I created the file and put it on the server:
<?xml version="1.0"?>
<!-- http://www.foo.com/crossdomain.xml -->
<cross-domain-policy>
<allow-access-from domain="http://127.0.0.1:8000"/>
<allow-access-from domain="127.0.0.1"/>
</cross-domain-policy>
Then tried the application again, I got error in console of my FB Error: Request for resource at http://127.0.0.1:8000/go/active/ by requestor from file:///Users/oleg/Documents/FB3/usersList/bin-debug/usersList.swf is denied due to lack of policy file permissions.
I don't know how to fix the error. But also the question is there a way to configure FB3 to put my swf files to the server directly, so I will not need any crossdomain?
Thanks
Oleg
We struggled with this a lot. The Flex security stuff didn't strike me as well built, but perhaps we just had different approaches in mind than Adobe's developers. The solution that worked for us was to serve both the SWF and the dynamic data from the same host and port.
On our development boxes, we tell Apache to serve the SWF from a directory in the workspace, and the dynamic data from a local copy of the app. When we push to production, SWF and app get pushed simultaneously to the same virtual host.
If that's inconvenient for you, the Apache ProxyPass directive can be used to make Apache front for other servers. I've not used that in production, but it's been very handy for developer setups.
I don't know a way to get FlexBuilder to automatically deploy your changed SWF; you could certainly look into an automation approach (like Maven and Flex-Mojos) to make that happen.
That said, getting rid of that error is usually just a matter of adding a policy file to the server.
The second error is caused because you're trying to fetch http resources from a "file" location. My recommendation is that you change your Flex Builder project so it outputs to a location within the Django web site, rather than to the flex-bin directory. This setting can be changed in the properties dialog of the project. Then, you should be able to have your front-end and back-end share the same protocol and domain.