Getting Sitecore 404 for physical files - sitecore

The media library URL (/sitecore/shell/Applications/Media/MediaShop/default.aspx) is being picked up by the SiteCore handler and redirected to the page-not-found page Sitecore uses (/sitecore/service/notfound.aspx). The file is a physical file and is actually there. I've seen things like this happen with items in the Sitecore content tree, but not with physical files. Any ideas where to look would be appreciated. Thanks.
Update: So, the issue as described above is fixed, but it's clear that there are other problems, seemingly also media related. This file: /sitecore/shell/applications/media/mediafolder/mediafolder.js is showing the same symptoms I've described above. They file is there on the server, but Sitecore is redirecting to it's 404 page.

Ok...here it is: Found this line in the web.config:
<handler trigger="/media/" handler="sitecore_media.ashx"/>
Which should be this:
<handler trigger="~/media/" handler="sitecore_media.ashx" />
After I made that change, everything worked great.

It looks like the physicalFolder attribute of your sites configuration is not set properly.
<site
name="helloworld"
hostName=www.helloworld.com
virtualFolder="/virtual"
physicalFolder="/hello"
rootPath="/sitecore/content"
startItem="/Hello Home"
language="en"
database="web"
domain="extranet" />
Double check if this parameter for the site is set properly. According to the Sitecore documentation, the files stored in the physical folder always take precedence over the Sitecore Items. Here are some details about the physicalFolder part of the sites config:
site Attribute Properties: physicalFolder
If it's not a problem with the sites configuration you may try to put a txt file or an image in the same directory and check whether Sitecore serves them properly.

I apologize if this is patronizing, but I'll post it anyway in case it helps.
Have you registered the path to be ignored in the "IgnoreUrlPrefixes" setting? I don't see that anyone has mentioned that, but perhaps that's because it's obvious.
<setting name="IgnoreUrlPrefixes" value="/sitecore/shell/Applications/Media/MediaShop/default.aspx" />

Related

ColdFusion 2018 Admin Console Shows Indestructible Search Bar

When I login to ColdFusion 2018 admin console the screenshot below shows up. The close button is not working. Neither is the search box. Restarting the WebLogic server and reopening console are not helpful. How to fix this? I never had this issue using ColdFusion console before this.
This is the console log in browser. No error reported in Eclipse.
You are missing the /cf_scripts mapping that serves the jQuery script that is required to run the frontend of the CF2018 admin console.
The mapping should point to /ColdFusion2018/cfusion/wwwroot/cf_scripts/.
If you are using the built-in Tomcat, locate /ColdFusion2018/cfusion/runtime/conf/server.xml and adjust your context:
<Context path="" docBase="/your-webroot/" workDir="/ColdFusion2018/cfusion/runtime/conf/Catalina/localhost/tmp">
<Resources>
<PreResources className="org.apache.catalina.webresources.DirResourceSet" base="/ColdFusion2018/cfusion/wwwroot/CFIDE" webAppMount="/CFIDE" />
<PreResources className="org.apache.catalina.webresources.DirResourceSet" base="/ColdFusion2018/cfusion/wwwroot/WEB-INF" webAppMount="/WEB-INF" />
<PreResources className="org.apache.catalina.webresources.DirResourceSet" base="/ColdFusion2018/cfusion/wwwroot/cf_scripts" webAppMount="/cf_scripts" />
</Resources>
</Context>
If you are using IIS, you can simly add a virtual directory. A symlink would probably work too for that matter.
It seems to be an incorrect value in your neo-runtime.xml file. CfFormScriptSrc value should be just "/cf_scripts/scripts/". For those who don't understand, refer to the discussion at https://forums.adobe.com/message/10705035

One or more files could not be uploaded. See the Log file for more details in sitecore 7.1

I get this "One or more files could not be uploaded. See the Log file for more details." error when i tried to upload an image file using firefox browser. In other browsers (IE and Chrome), it works fine. I checked whether WebDav.config causing the issue and i removed this config but didn't help. Also, I checked the anonymous access on Applications/FlashUpload and /Applications/Media.
Does anyone encountered this scenario?
May i know what is the cause.
Sitecore version : sitecore 7.1
Firefox 27.0.1
Thanks,
Mohan
Please try modifying the following settings:
<setting name="Upload.Classic" value="true" />
answer from user459491 will solve the problem, but it simply changes the controls used for file downloads. I had same issue and the reason was that our website used windows authentication and asp.net authentication. The solution is explained here:
http://maesitus-sitecore.blogspot.co.uk/2011/04/sitecore-media-upload-is-not-working.html
"I have then lodged a ticket with Sitecore support. Few days later they come back with a solution that is to enable "Anonymous" authentication in IIS for ‘/sitecore/shell/Applications/FlashUpload’ and ‘/sitecore/shell/Applications/Media’."

sitecore multi site set up in visual studio 2012

I want to set multi site setup in Visual studio for multiple sites in Sitecore. I want to have separate Layouts/sublayouts/ascx and code behind for all websites. Also i want separate config files for each website so that it will be easy to update individual sites. i didn't find any appropriate documentation from web.
Any help
This is what I do as far as Sitecore and Visual Studio structure goes:
1) Create sub folders for your sites in Sitecore within the Content, Layouts, Templates and Media Library folders.
2) Create sub folders in your web root on disk. Do this for the Layouts/View folder, but also for the client-side includes (css/js).
So you will get a structure like this:
3) Create a separate web application project for each site and place the .csproj file inside the web root.
Then include the necessary folders per project (so the Include/Site1, Views/Site1 folder are included in the project for Site1, etc).
4) Configuration is a little tricky, because you will always share one Sitecore configuration with all the site instances.
But what I do for settings is prefix them with the site name, like this:
<setting name="Site1.MySetting" value="MyValue" />
You can then put that in separate config files in the /App_Config/Include folder.
That will give you at least some separation of configuration per site.
I would create at least one sub folder within the Include folder to ensure your custom configuration is included as last.
5) I will usually also add one "site" project called Global that contains everything that is shared between the instances.
That will mainly contain templates in Sitecore and in the VS project it contains references to /sitecore files, global.asax, web.config and App_Config files.
There are of course many more factors to account for, but these are the basics for setting up the solution.
I think this should be the documentation you are looking for:
http://sdn.sitecore.net/Articles/Administration/Configuring%20Multiple%20Sites.aspx
Here is a great blog I've read:
http://www.sitecore.net/Community/Best-Practice-Blogs/Topics/Multisite-Management.aspx
I have multiple solution files set up for multiple sites.
A suggestion would be to also move the App_Config, web.config, and bin libraries into the solution helps.
Setting up Sitecore Rocks will also be a great asset.
Edit: More Info
Hedgehog development has an amazing plugin for Sitecore as well called Team Development for Sitecore (TDS). You can check it out here.
http://www.sitecore.net/Partners/Technology-Partners/Hedgehog-Development.aspx
http://www.hhogdev.com/products/team-development-for-sitecore/overview.aspx
I point my solution at: \inetpub\wwwroot\sitecore\Website
At the root of my solution:
App_Config folder which holds my connection string configs and Lucene configs.
Libraries folder which holds my application specific dlls.
Sites folder which holds the sites and all the respective sublayouts. Sites contains multiple websites which all contain at a minimum of css, Images, layouts, Services, Scripts, and Sublayouts.
The server's web.config with web.debug and web.release.
All of this is checked into Team Foundation Server with build servers and more.
For the layouts and sublayouts you can separate them like Rudd van Failer showed us above in VS, using directories named like your site (and point the layouts/sublayouts in sitecore to the appropriate places).
i.e.
For configuring your sites in VS, add all your site configurations to the SiteDefinition.config (or setup separate projects that contain their own SiteDefinition.config pointing each site to the appropriate sitecore location). i.e.
<sites>
<site name="site1" patch:before="site[#name='website']" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/" startItem="/site1/home page" />
<site name="site2" patch:before="site[#name='website']" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/" startItem="/site2/home page" />
</sites>

How do I add a custom .aspx page to sitecore?

I've recently created an aspx and aspx.cs page that needs to run alongside a sitecore website. Does anyone know how i can add these pages into the site? Our set up is very odd and would like to know recommendations before trying anything and risking breaking our setup.
You don't necessarily have to add your page to the IgnoreUrlPrefixes.
Before the ItemResolver is executed, the FileResolver is executed which checks if your request points directly to a file on disk.
You do need to configure the allowed URL extensions in the FilterUrlExtensions processor of the preprocessRequest pipeline, as such:
<preprocessRequest
<processor type="Sitecore.Pipelines.HttpRequest.FilterUrlExtensions, Sitecore.Kernel">
<param desc="Allowed extensions (comma separated)">aspx, ashx, asmx</param>
<param desc="Blocked extensions (comma separated)">*</param>
</processor>
</preprocessRequest>
So that configuration will allow *.aspx, *.ashx and *.asmx to be requested directly (it's the default configuration in Sitecore 7.0).
If you're using Sitecore 6.6 or lower, the FilterUrlExtensions processor can be found in the httpRequestBegin pipeline.
If you just drop the ASPX page in at the path you'd like it to reside, by default, Sitecore should let it be served as is by going to the corresponding URL.
Just add the pages to the projects as normal (as DustinDavis suggested) but you also need to modify IgnoreUrlPrefixes in web.config (or add a config patch file) and include the pages or folders as pipe delimited values that you want the Sitecore handlers to ignore.
You can configure the value attribute of the
/configuration/sitecore/settings/setting element in web.config with
name IgnoreUrlPrefixes to prevent Sitecore from processing specific
requests, causing ASP.NET to process the request without Sitecore.
From Sitecore Presentation Component Reference
There is more information about the how and why in this blog post by Alex Ahyba
If you have sitecore open in Visual Studio, just add them in to the project. You can access the new page directly.

Sitecore IndexFolder (override default setting) not working

I've recently had some trouble moving the location of the indexes folder (for the in built Sitecore Lucene indexes).
I have updated the setting "IndexFolder" (originally in web.config but moved out into include). The config output in http://{mydomain}/sitecore/admin/showconfig.aspx is correct, the setting has the correct path (now in the Data folder instead of Website folder).
However, when I jump into the control panel and rebuild the index, it is still created in the default location ("/indexes", relative to the web application).
Has anyone had a similar problem in Sitecore not using the correct path?
Make sure the new folder is writable by ASPNET-user or NETWORK SERVICES.
If that's not working, list a Sitecore support case.
OK, when adding settings to an include file make sure you get the xml path correct.
I had:
<sitecore>
<setting name="IndexFolder" value="C:\...\Indexes" />
</sitecore>
Should have had:
<sitecore>
<settings>
<setting name="IndexFolder" value="C:\...\Indexes" />
</settings>
</sitecore>
All is well in Lucene world. Thanks for your help everyone, but it turns out I'm a victim of my own stupidity.