Tridion Copy/Paste In the same org item causes TCM54 Error - tridion

We are experiencing a strange issue after upgrading from Tridion 2011 GA to 2011 SP1 HR1. When doing a copy-paste of components within the same folder we normally get a popup asking if we want to paste with a different name, however, in our case we see an error message as follows:
/WebUI/Models/TCM54/Services/General.svc/CopyPasteItem failed to execute. STATUS (500): Internal Server Error The page cannot be displayed because an internal server error has occurred.
The only thing that is visible in the Event Viewer logs are warnings, which are expected (because my test VM gets them too). We don't actually see any errors other than the one in the GUI.
When copy/pasting components within a folder:
Unable to paste the item into this Folder.
Name must be unique for items of type: Component within this Folder and its BluePrint context. Source or sources of conflict: tcm:4-81455.
Error Code:
0x80040329 (-2147220695)
Call stack:
UtilitiesBL.AssertUniqueTitle
UtilitiesBL.CloneItem
ComponentBL.Clone
Tridion.ContentManager.ContentManagement.RepositoryLocalObject.Copy(OrganizationalItem,Boolean)
Tridion.ContentManager.BLFacade.ContentManagement.RepositoryLocalObjectFacade.Clone(UserContext,String,String,Boolean)
Folder.PasteItem
When copy/pasting Pages in Structure Groups:
It is not possible to paste this item into a Structure Group.
Name and File name both must be unique for items of type: Page within this Structure Group and its BluePrint context. Source or sources of conflict: tcm:5-82986-64.
Error Code:
0x80040329 (-2147220695)
Call stack:
UtilitiesBL.AssertUniqueTitleAndFileName
UtilitiesBL.AssertUniqueTitleAndFilename
UtilitiesBL.CloneItem
PageBL.Clone
Tridion.ContentManager.ContentManagement.RepositoryLocalObject.Copy(OrganizationalItem,Boolean)
Tridion.ContentManager.BLFacade.ContentManagement.RepositoryLocalObjectFacade.Clone(UserContext,String,String,Boolean)
StructureGroup.PasteItem
As mentioned above, these are normal warnings generated in the Event log, but we should be getting a popup, not the error.
We have tried restarting the server thinking it's a one-off type of quirk, but that didn't help. I understand that "TCM54" as mentioned in the error message refers to code running through COM+. Can anyone please offer some advice?

Take a look at this post: Unable to save Publication Targets in Tridion 2011 SP1
I seem to recall that pasting uses the old (COM based) code like Publication Targets do.

Related

ASP.NET Issue find View in all solutions

I am trying to run the AD-aspnetcore-webapp-openidconnect-v2 / 1-WebApp-OIDC / 1-5-B2C sample.
Running on localhost I get the not uncommon error (not uncommon in that there's no shortage of relevant questions):
An unhandled exception occurred while processing the request. InvalidOperationException:
The view 'Index' was not found. The following locations were searched:
/Views/Home/Index.cshtml
/Views/Shared/Index.cshtml
/Pages/Shared/Index.cshtml
Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.EnsureSuccessful(IEnumerable<string> originalLocations)
I also get the same error with a another totally different ASP.NET solution.
With this other solution I can confirm the routing is correct as the correct Action gets called. From this Action I can return a string, but not a View. Right-clicking on the Action in VS (Microsoft Visual Studio Community 2022 (64-bit) Version 17.0.4) gives me the Go To View option, which successfully navigates me to the expected View in VS.
So because the same issue appears to consistently affect two solutions, including one I did not develop myself, I'm assuming it's some sort of issue with my system / IIS express?

What is causing intermittent "Object reference not set to an instance of an object" at compile time in VS 2010?

I am sorry if this is not really a coding question (it depends on if its my code causing the problem I suppose).
I have seen this question: Tracking down intermittent 'Object reference not set to an instance of an object.' error on build
However, it has not been of much help (although if you read the comments, you will see that I thought it did help for a while there).
When I try publish my website, occasionally, I will get an error with no file or line reference:
Pre-compiling Web Site
Building directory '/App_Code/'.
Building directory '/'.: Publication (web): Object reference not set to an instance of an object.
Pre-compilation Complete
------ Skipped Publish: Project X:\, Configuration: Debug Any CPU ------
I know the usual causes of "Object reference not set to an instance of an object" but this seems a bit different, isn't it supposed to be a runtime error? Not a build error?
What is weird is that it happens, seemingly at random (about 25%-33% of the time). I can try to publish it and have it fail. Then try again straight after, without changing anything and it works fine.
I started getting this error after moving some of my functions (VB.net btw) to a new file in the App_Code folder so they can be accessed by all pages of the site.
If you need any more info, please let me know.
Thanks,
EDIT: After further investigation, it seems to only happen if I try to publish the website within a few seconds of saving changes to any file within it. What could cause this?
The same error occurred for me to, I deleted the dlls of the custom controls in the web site that are already in the bin, then i published the web site, and succeeded
IF you have any custom/usercontrols in your project, they are actually running at design time and can give object ref errors. This can occur during builds too. In that case, a property is being referenced that is NOTHING and throws the error.
I had a similar problem with a Windows Form project.
Wherever I try to move a custom control on the windows form, and then try to save the form, VS2010 comes back with "Object not set to an instance of an object".
I suspected the error was deep down in the layers of abstraction in my inherited code, but couldn't work out how deep to go, without reviewing every line of code.
My solution to this problem is this.
Open up another instance of Visual Studio 2010
Menu: Debug | Attach to Process..
Search for "devenv.exe xxx YourApplicationName..." and select it
Click "Attach"
Menu: Debug | Exceptions..
Tick all the boxes in the thrown column, then "OK"
Your second instance of VS2010 is not debugging your first instance, including all the custom controls.
Return to the first instance of VS2010, and repeat the actions that caused the error in the first place, the second instance of VS2010 will break at the line of code that has the error.
You may want to look at this link there is a bug in vs2012
https://connect.microsoft.com/VisualStudio/feedback/details/749901/error-when-i-click-publish-object-reference-not-set-to-an-instance-of-an-object

activity could not be loaded because of errors in the XAML

Considering the following scenario:
Create MyCodeActivity1 with argument MyArgument1
Add this activity to a myworkflow.xaml
Rename MyArgument1 in MyCodeActivity1 to MyRenamedArgument1
If you open myworkflow.xaml, visual studio will show this error:
activity could not be loaded because of errors in the XAML
Is there a facility where visual studio can give more information about the error please?
For now I have created a small windows application that tries to execute the workflow and shows an error message if invalid. This does give a clear message. But it would be great if visual studio provided this functionality directly.
No.
Nope.
Nuh uh.
Visual Studio's refactoring can't handle change in Activity code => change in XamlAppDef XML. Its not surprising, such a chain of logic would be complex to achieve. So whenever you do this you must expect your workflows will have to be fixed. Either plan ahead, or...
Any time a workflow won't compile, or if it shows the red box of pain in the design surface, you should always right click on the workflow file, select Open With... and select the XML (text) editor. You will see the squiggly error lines and more detail about the error in this view.
I got the same error("activity could not be loaded because of errors in the XAML"), But in my case, I had created a Code Activity and used that in a State Machine. But, I found out that the defined Code Activity had not been shown in the Toolbox. It means that the Code Activity is not identifiable to Windows Work Flow.

Tridion 2009 SP1 TcmUploadAssembly not able to overwrite existing TBBs

I am using the TcmUploadAssembly utility in a post-build event but am receiving the following error from the tool.
Error 1 Name must be unique for items of type: Template Building Block
within this Folder and its BluePrint context. Source or sources of
conflict:
tcm:5-200-2048. C:\Projects\Project1\src\Tridion\TBBs\EXEC Compound
Templates
The TcmId given refers to the Assembly stored in Tridion which I would expect because that is what I am overwriting. In the past this "just worked". Am I missing something?
Notes:
My user is an admin
The Tridion instance is on my network so I am using credentials in context.
I have specified all settings via the command line (no config.xml is used)
Any ideas?
I would say check your Blueprint context (i.e. the Publication you are in). This error means you are trying to create the TBB, yet there is already an item with the same name probably somewhere down in the Blueprint child Publications.
Classic writing out the problem and the problem solves itself...
I discovered the folder is set in the AssemblyInfo as well and I had the folder set incorrectly on the command line (Blueprinting issue).
I ran into a second problem however, if I set uploadpdb:true on the command line I receive this error
Error 1 Could not write file: c:\Temp
Setting uploadpdb:false resolves the issue.

System.Web.HttpException Could not load type '[namespace].???'

This started as Could not load type 'Global' error. After I tried a few things and getting no where I deleted the Global.asax file and now the error is Could not load type '[namespace].???'
Where ??? is the class name of every page I try to load
The web site (when executed within VS2008, local dev computer) works fine but once published (with no errors) and deployed to the server gives me Could not load type '[namespace].???' error
I did install elmah and I was able to get more details for this "generic" Could not load type '[namespace].???' error
elmah reports a HTTP error 500 :
System.Web.HttpException Could not load type '[namespace].???' ->
System.Web.HttpParseException: Could not load type '[namespace].???'
Any ideas?
I have checked the "basics"
References
Doing a clean and a build
Checking the Inherits attr in the HTML against the code behind
UPDATE #1
I did deploy the site to a different DEV computer (configured IIS, virtual folder, etc.) and it works. When I use the same published code on the server, get the generic Could not load type '[namespace].???' error
UPDATE #2
I created a test web app. One form (Default.aspx) with a button. The click event does a Response.Write("Hello World"); I moved this app to the server and guess what, I get the Could not load type TestSite._Default
UPDATE #3
According to the fusion log viewer, these two websites are attempting to load CppCodeProvider and VJSharpCodeProvider, but I have no references to any of these. After a Google search, I found this post
I checked and I have no references to JAVA files. Still don't know what the problem is
Strangely enough, sometimes we get this error when the disk is full.
Make sure the project file is uploaded to the build server along with the added files. VS will add lines to this file that points to the new files location.
<Content Include="xxx.aspx" />
<Compile Include="xxx.aspx.cs">
<DependentUpon>xxx.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
Without the updated project file it will not find the code behind.
Really weird, maybe you should try to test it in a different server, this happens for example when you are using in you dev environment some namespaces from .NET 4.5 and you haven't installed the same framework in your server, so maybe the error is related to this behavior, if you are not using any third dll in your web application outside Microsoft's framework, so should try to reinstall the framework, I don't think the problem is related to visual studio.

Resources