Magento: changed layout to the default one and admin crashed absolutely - templates

Went to Configuration - Design and changed everything at template section to Default.
After that I het this at each admin page.
Fatal error: Call to a member function setActive() on a non-object in /home/white/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php on line 96
No I can't even turn it back! How to fix it? How to turn it back at least... Maybe directly through MySQL
Also, Magento was updated from 1.5 to 1.6 not so far.

Have a look at the table core_config_data
I do not recall the exact configuration paths, so you could do something like this:
SELECT * FROM core_config_data WHERE path like "%theme%"
SELECT * FROM core_config_data WHERE path like "%skin%"
This will show you the currente theme and skin configuration settings. Then you can use an
UPDATE core_config_data SET value = "workingskin" WHERE path = "configuration/path/goes/here"
to change the skin and theme. (the path must be replaced by what you just found out using the above SELECT.

Related

Sitecore 7.2 Media Library images not working with underscore in the name

I just upgraded a client's test installation of Sitecore to 7.2 (SP1) and now, any image that has an underscore in its name is throwing a 404 error when being referenced by a page. This was actually a series of upgrades from 6.4 so it's quite possible that a config setting somewhere got missed along the way, but I don't see anything standing out at me that would cause this problem.
If I change the image name to not have an underscore, it works fine, and it also works fine if I set "Media.UseItemPaths" to false, but they would prefer it if their image URL's had the file name displayed.
Can anyone help identify what may have gone wrong?
Due to a change in Sitecore 7.1, any replacements specified in encodeNameReplacements are now also applied to media items as well as regular items in the content tree.
One option is to remove the replaceWith="_" declaration, but the likely reason this was added was to possibly replace spaces in your URLs so they do not display with %20. Removing this declaration will mean they return!
You can instead apply the fix specified in this Sitecore Knowledgebase article: Sitecore is unable to open media items when using encodeNameReplacements

Umbraco error in Document Types

A long time ago I first setup a website in Umbraco. This seemed to be working fine.
I have now come back to it about a year later, and was initially getting the following error when selecting a Document Type (any document type in the Settings tab):
A bit weird, because earlier I didn't have this issue, but fine. I do what it says, and add <identity impersonate="true"/> to the <system.web> node in web.config.
While it does fix the initial issue, I now have the following on all document types:
When trying to create a new Document Type, I get the same kind of error, but then the ReturnUrl part is ReturnUrl=/umbraco/create.aspx?nodeId=init&nodeType=inittemplates&nodeName=Templates&rnd=20.2&rndo=21.2&nodeId=init&nodeType=inittemplates&nodeName=Templates&rnd=20.2&rndo=21.2' - but only if I tick the box 'Create template for this item'. The same happens when I try and create a Template.
After Googleing I came up with this: our.umbraco post with similar issue. One (unconfirmed) solution is that there's an illegal name in a document type/ template - but I haven't changed anything, and might be fixed by going into the database.
I did check the /masterpages folder, the only 'strange' characters in there are - and _.
In my Document Types I have on named 'Textpage (Two col)' and another named 'News & Events list'. I'm a bit hesitant to just delete them, since I don't have enough Umbraco knoledge to be sure this will fix my issue...
Is there any known solution for this, or will I also have to go into the database (and if so, whereabouts?)
I'm running Umbraco 4.7.2, assembly version 1.0.4500.21031.
I've hosted this site with GoDaddy.com - I don't know if that would be relevant.
[Update 1]
As per Tom Maton's comment:
The requirepermissions should be set to false, and have been.
in Appsettings I've set this:
<add key="umbracoUseMediumTrust" value="true" />
And I've added Trusted_Connection=yes to the connectionstring.
the problem remains.
[Update 2]
Tried the solution amelvin provided, but no dice. Doctypes and templates still give the error. I'm getting more certain it's some security issues. Which folder would correspond to the Templates? Would that be the masterpages folder? If so, what kind of permissions does that one need?
It could be that you don't have full trust on your Go Daddy environment?
Check this post out http://our.umbraco.org/forum/getting-started/installing-umbraco/17856-Umbraco-on-GoDaddy-Shared-Hosting
Could help resolve your issue.
The error could be a knock on from permissions errors as yet unsolved.
But the error is thrown if the content page does not have a template assigned or if Umbraco thinks it doesn't have a template. If absolutely nothing has changed to the site then it could be that the umbraco.config file has somehow got corrupted (it will contain all the doctype/template cross reference info). This can be fixed by right clicking on the top 'content' node and choose 'republish entire website'.
Secondly navigate to the settings | document types (if you can now) and check the templates dropdown on the first tab of the appropriate document type. If its set to 'please select' then this error will get thrown when any page tries to render without a valid template assigned. If a default template is assigned - then go to that template and re-publish it - Umbraco may have lost it.
If this does not work then check if the template is assigned properly. Go to the same place in the content tree as the problem page and try to add a node with the desired doctype. If no choices are offered then it could be that the parent tab no longer allows the correct doctypes as children nodes, so go back to the doctypes and check the allowed children (second tab) of the parent node.
If none of this works without odd errors being thrown then its a mystery!
Here are a list of Permissions required for Umbraco http://our.umbraco.org/wiki/reference/files-and-folders/permissions
Or you could use one of the steps below to check all the folder permissions.
http://our.umbraco.org/wiki/reference/files-and-folders/permissions/perform-permissions-check
Or install this package. http://our.umbraco.org/projects/backoffice-extensions/ugolive this will allow you to check the permissions are correctly setup.

Coldfusion mapping cfinclude

I am trying to use mappings for the first time and I am having some issues. In my CFadmin I created a mapping which goes like this:
Logical Path:
/email_sender
Directory Path:
E:\sites\Example.Com\cf_modules\autoresponders\Emails\emailLists
I am trying to access the include file from a .cfc. Inside my cfc I have an include file which is in the same folder and it works just fine but that include file is tying to access another include file based on the information I am passing through.
The include file inside the component has this code in it.
<cfmail from="#emailData.sender#" to="#surveymain.email#" subject="#subject#" type="HTML" >
<cfinclude template="#emailData.includePath#" >
</cfmail>
Just to be more clear this is my total filesystem:
access.cfm -> some.cfc -> include_1 (works) -> include_2 (issue with
the path)
I have a try/catch which emails me the errors and it is located inside the include_1.
How can I use the mapping that I created to finally be able to access my include file?
Please note that after emailLists I have dynamic folders which change depending on which client I am trying to send the email to. So the end result of the path would be:
E:\sites\Example.Com\cf_modules\autoresponders\Emails\emailLists\client_A\email_template.cfm
I tried using my mapping by doing this
<cfinclude template="/email_sender/#emailData.includePath#" >
which gave me this error:
The path to the CFC must be specified as a full path, or as a relative
path from the current template, without the use of mappings.
Also, I tried including a full path in the cfinclude whic also resulted in the following error:
Note: If you wish to use an absolute template path (for example, >template="/mypath/index.cfm") with CFINCLUDE, you must create a
mapping for the path using the ColdFusion Administrator. Or, you can
use per-application settings to specify mappings specific to this
application by specifying a mappings struct to THIS.mappings in
Application.cfc. Using relative paths (for example,
template="index.cfm" or template="../index.cfm") does not require the
creation of any special mappings. It is therefore recommended that you
use relative paths with CFINCLUDE whenever possible.
Any help/suggestion would be much appreciated
Edit:
After restarting the server the version that worked was this one:
<cfinclude template="/email_sender/#emailData.includePath#" >
Thanks to those who replied.
Some questions, rather than some answers.
Did you set the mapping in CFAdmin or in Application.cfc?
What do you get if you run the code below?
#expandPath("/email_sender")#
What is the value of #emailData.includePath#?
What is the value of this: #expandPath("/email_sender#emailData.includePath#")#?
Can you provide us with the exact text of the error messages, rather than vaguely describing them.
What is the value of #fileExists(expandPath("/email_sender#emailData.includePath#"))#?
If you can update your question with that info, you'll either spot where you're going wrong, or we can help to work out what the story is
Something like this happened to me once before. Essentially we edited the xml file, rather than using the admin interface. It wasn't until our sys admin restarted the server until we realized why the mapping hadn't taken. So have you restarted the server since you added the mapping?

Coldfusion mapping error

Note: If you wish to use an absolute template path (for example,
template="/mypath/index.cfm") with CFINCLUDE, you must create a
mapping for the path using the ColdFusion Administrator.
I went to the administration page but not sure what to put in here.
I'm pretty new to coldfusion. anyone got any ideas why this would be happening.
CFINCLUDE uses relative paths in relation to the file where the cfinclude is, so if want to include a file in another directory, 1. it has to be inside your wwwroot (or the root directory, or subdirectories) of your site, 2. you can go to other directories by doing ... hope this helps a little bit. If you want to include a file that is outside of your wwwroot, then you'll need to map that directory in Coldfusion Administrator using the same syntax above when you do include it.
To add a mapping, open your coldfusion administrator.
Server Settings > Mappings
There are 2 paths. Logical and Directory.
Logical can be anything you want, and directory is where it maps to.
eg. you might have a folder below your web root which stores email templates mapped as:
logical path: /emails
directory path: /var/www/mycfapp/content/includes/emails
You can <cfinclude template="/emails/forgotPass"> from any cf template and the mapping would get picked up.
You can use the mappings for new object creation too. Lets pretend forgotPass is a cfc.
fp = new emails.forgotPass();
// if you have funky characters in there, eg dash, just quote it.
fp = new "emails.forgot-pass"();
Mappings also work when extending cfcs. With one small exception. No leading slash.
component extends="emails/forgotPass" {
// ...
}
Im pretty sure mappings are detected first, so if you have a folder with the same name it might not get picked up.
In cf9 you can also specify your mappings in your Application.cfc, instead of coldfusion administrator, which affects all applications on your server. eg.
this.mappings["/emails"] = "/var/www/mycfapp/content/includes/emails";
You'll need to tick the Enable Per App Settings option on the cfadmin Settings page.
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0b63c-7fd5.html

Access sitecore settings programmatically (Sitecore 6)

Is there a way to get to sitecore settings through code.
The specific setting I'm interested in is the data Folder path.
If you'd like to get other settings, you may want to try:-
Sitecore.Configuration.Settings.GetSetting("SettingName");
This will work for all sitecore settings, even your custom settings that can be added through the config files in the App_config/Include.
Yes. Look at the Sitecore.Configuration.Settings class (which is your entry point to the Sitecore settings), and use the static DataFolder property:
string dataFolder = Sitecore.Configuration.Settings.DataFolder;