SharePoint deployment, ghosted file returns 404 - sharepoint

After deploying an upgrade to a particular feature which contains ghostable page template, the page starts returning a 404 response.
In the SharePoint log, I get the following
Cannot get ghost document: Features\FeatureName\SubFolder\PageName.aspx
Unknown SPRequest error occurred. More information: 0x80070002
I am able to get the page working by going through SharePoint Designer and deleting the file, then deactivating/activating the feature on that site.
I've attempted resetting the web to its definition with no change.
I would like to have a programmatic solution, whether it be fixing something in the feature's configuration or an update program.

I was able to work-around the problem by
Adding a snip of code to the feature deactivating event to delete the file in question from SitePages.
SPFolder sitePagesFolder = web.GetFolder("SitePages");
foreach (SPFile file in sitePagesFolder.Files)
if (file.Name == "pagename.aspx")
file.Delete();
And using a utility, go through all the affected webs, re-activating the feature in question, which causes the 'orphaned or whatever' file to be removed, replacing it with the current version's
I don't understand the inner workings of the issue completely, but it seems that when the feature is deleted/reinstalled, sometimes the associated, ghosted file is orphaned, leading to this issue.

Is it possible that the upgrade deleted the file from the file system? cause this is the likely reason. go to the feature folder and see if the file is still there. the feature folder would be under template\features under 12/14 (depending on SP version)

Related

SiteMapPath empty after upgrade to MVCSiteMap 4

I just attempted to update the site map provider from 3.3.6.0 to 4.0.14. I followed the instruction on the wiki however my SiteMapPath now renders empty. I made no changes to the mvc.sitemap file other than updating the schema to 4.0. When I debug into the SiteMapPathHelperModel I find that the model has no nodes defined. I am using the internal DI container (I would like to get this working before switching over to the application container).
When I check the sitemap.xml file it is well populated which makes me think that the mvc.sitemap is being read.
I'm out of ideas on this one and would be happy to provide any additional information which may be useful. I'm not even sure where I can hook into debug this problem. Literally the only thing I changed between a working 3.3.6.0 and a not working 4.0.14 was what was prescribed on the wiki.
Ok, since your /sitemap.xml endpoint appears to be working, you are correct the sitemap is being populated and loaded correctly.
There are a couple of things I know of that can cause this to happen:
If you are using Dynamic Node Providers, they must be added to a node that is not otherwise part of the sitemap. See my question here - I am trying to figure out why this is the case as well.
Your routes don't match your nodes - please read Routing Basics and/or post your routes and Mvc.sitemap XML.
If you check the above and everything appears to be correct, please make a small demo project showing a sample of your configuration and open an issue on GitHub, as it is highly likely your specific configuration has something to do with the problem.
BTW - You can debug by cloning the current repo on your system or downloading the solution as a zip, enabling NuGet package restore on your solution (right click the solution > Enable NuGet Package restore), add the MvcSiteMapProvider project to your solution, and then in your project remove the reference to MvcSiteMapProvider and add the reference to the newly added MvcSiteMapProvider project from your MVC project. Then you can add breakpoints and step through the code. I suggest making a backup of your solution (or ensure you can roll back another way) before doing this, and reverting back to your current state when done.
I have documented the whole procedure here: http://www.shiningtreasures.com/post/2013/08/21/debugging-an-mvcsitemapprovider-configuration

Error on installing any module in DotNetNuke 5.6.3

When I upload any module in System->Extensions in DotNetNuke 5.6.3, running on a Windows 2008 R2 server, IIS 7.5, after the correct module information is displayed and I hit next, I receive the error message
Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object.. ---> System.NullReferenceException: Object reference not set to an instance of an object.at DotNetNuke.UI.WebControls.FieldEditorControl.CreateEditor()at DotNetNuke.UI.WebControls.FieldEditorControl.DataBind()at
DotNetNuke.UI.WebControls.PropertyEditorControl.AddFields(Table tbl)at
DotNetNuke.UI.WebControls.PropertyEditorControl.CreateEditor()
[...]
and the module is not installed. The file system of the web has not been touched, so I thought it was a permission problem, but even allowing user Everyone to do everything doesn't help (after making sure the ApplicationPoolIdentity user has been allowed full access as well).
Any hint is appreciated.
The manifest of the module is valid (it's Dynamic Registration 4.1).
Update: Installation steps (note: I am using a German installation of Windows 2008, so some translations might not be accurate)
Log in as Hosts Super User (Admin)
Either navigate to System->Extensions or System->Module Definitions (System might be identical to Hosts) - I tried both
In System->Extensions, click Installation assistant for extensions
Select file to upload
Click next
Description of uploading package appears correctly - click next
Error message Object reference not set to an instance of an object. appears on top of the page. Log View shows stack trace as partly displayed above.
What can cause an error in DotNetNuke.UI.WebControls.FieldEditorControl.CreateEditor()?
What kind of permissions could be missing?
Update 2: By step-by-step debugging, I found out that the view state is broken, for some reason. The method BindPackage() in DesktopModules\Admin\Extensions\Install.aspx.vb doesn't find the current Installer Package. I have not yet found out why the viewstate breaks. It is enabled and huge in the rendered page source.
As described in Update 2, the page's viewstate is lost in DesktopModules\Admin\Extensions\Install.aspx.vb. Simply replacing ViewState by Session works (but this workaround may be lost after the next DNN update).
Update (in case someone has a similar issue):
The DNN container that was used had its viewstate turned off! This results in all kinds of weird behaviour, but it took time to track that error. Now it's obvious.

Liferay - how to disable monitoringfilter

As the title says.
I tried adding com.liferay.portal.servlet.filters.monitoring.MonitoringFilter=false to my portal.properties but it still seems to be enabled. (getting a response already commited exception on it).
And since it only occurs at the customer and we're not monitoring the performance it seems best to turn it off.
Any input is appreciated.
(liferay-6.0.5)
Be extra extra sure that the portal-ext.properties you mention (you didn't refer to portal.properties, right) is really picked up - there will be a log entry at startup stating which portal-ext.properties is being read.
Put your portal-ext.properties in LIFERAY_HOME, that's the same folder that also has the tomcat, data and deploy folders (if you're on the tomcat bundle).
Also, on Windows, make sure that Windows shows also the extensions. I can't count how many times people created portal-ext.properties.txt and wondered why it wasn't picked up. (this file is only renameable on the command line, not in Explorer, if you have the "hide extension of known files" on.
I am experiencing the same issue as you and can confirm that the IllegalStateException will still occur even the monitoringFilter is disabled. The exception seems to occur on the filterChain, not actually on the MonitoringFilter. See http://issues.liferay.com/browse/LPS-13853

Failed to create feature receiver object from assembly/FileNotFound

During solution deployments & Feature activation, I am facing an on/off issue where the system is unable to find & load the FeatureReceiver class. Mostly it is file not found exception (even though the assembly is there in the GAC). I checked over the net and this seems it a common issue with solutions (wsp) packaging DLL to be GACed. (But, no one has any clue or solution!)
What is the recommendation and guideline to fix this issue? We are setting the flag to reset IIS in my solution definition - but that does not seem to help. The issue is more prevalent in multi-M farms.
Thanks
This is a general problem in SharePoint in cause of the "SharePoint 2010 Timer Service". Because this one caches the wsp's and during the deployment or feature activation old references will occurres this error!
So try the following link. I hope this solution will help you.
http://msscorner.de/en/2011/10/27/sharepoint-deployment-failed-to-create-receiver-object-from-assembly/
First try the solution linked to by Falco...
If that does not help, try this:
Open the event-receiver file created by sharepoint
Compare the GUID above the event-receiver-class with the one stated in the stack-trace "...class=7g3562-438dn4...
If it does not match:
Copy the content of the class
Delete the file
Create a new file by right-clicking the feature -> add new event reciever
Pass the content
First thing, you dont need to give iisreset as your wsp deployment would have already done that.
Can you check if the assembly name, version, public token specified in the feature.xml is same at the actual assembly that is deployed in gac? I am thinking there is mismatch in assembly signature

MOSS 404 errors for some users on certain sites, sometimes

Everything works fine for most accounts 100% of the time but here and there some users who are able to access a subsite fine one day are greeted with a standard 404 the next. This can last for an hour or two days, it's really inconsistent.
I check the iis logs and it says the status is also a 404 for these requests, nothing else looks unusual. Sharepoint logs have nothing for the timestamps either.
Correct me if I am wrong but if it was a permission issue an access denied message would be shown.
It is not the individual computer because when a user is having this problem and I can log in with their account and I also get the 404 error although I am on the exact site with another account in another browser at exactly the same time, and it works perfect.
Any suggestions would be greatly appreciated, I've done a fair amount of searching but can not find a similar situation or help anywhere.
Since the information is very strict at the moment, I will throw a few questions that might lead you towards the problem.
Are we on a loading balance setup? The intermittent 404 might be cause by one of the servers Web FrontEnds not correctly serving requests.
Are we running out of disk space in the SQL Server machine? This might cause it
Are the blogcache or site caches enabled? Some routines may break them
Do we have Anti-Virus on the server? (it HAS to be asked :p)
We get very high packet loss between the servers? (The error would be different though)
Something that might occur very often is when you have, say, custom code a DLL on the GAC or the bin folder, and since you could be on loading balance the second server does not have this DLL in its own GAC or BIN folder. Sharepoint usually raises 404s when assemblies are not found too, not only requests.
This seems like a longshot, but... could those SharePoint sites be throwing a 404 HttpException? It seems like you'd see that in the SharePoint logs, too, so it's even more unlikely.
At any rate, is your SharePoint logging level set to an appropriately verbose level to debug weird stuff like this?
Are people checking in & publishing master page changes when new CSS files and/or other includes (script files, etc.) are not yet published at all? I've seen this cause a 404 a few times when users forget to check before they publish.
I have had to write custom code within a SharePoint context and I had those 404 errors as well. The solution, in my case, was to ensure that the block of code executing had these 2 conditions met:
1) Run with elevated privileges, regardless of the fact that it is a 404 this was part of the solution.
2) web.AllowUnsafeUpdates = true; This line of code needed to be added even though it was wrapped within an elevated privileges block.
Once these were added the issue did not occur. This was happening on both load and non-load balanced environments.
This reminds me of a strange asp.net bug that I had a few months back.
It was caused by a patch that had been applied (to the framework if I remember correctly)
try downloading this Windows update list tool and have a look at what has changed since the problem started.
I concede that if there was a problem with a patch then its more likely that it would be a consistent error, but it's worth a look.
It was a permission issue, I had figured this out awhile back but basically a few accounts were not setup properly and could not load a fresh copy of the page, when someone else would hit it they would be able to view the cached page fine. Error was never thrown as a permission issue or access denied anywhere but this is what fixed the problem.

Resources