OrchardCMS duplicated item with same version Number and ContentItemRecord_id - orchardcms

Yesterday, the person in charge of adding content to our OrchardCMS website suddenly got this error when trying to access the Content section in the Dashboard and we can't add any new content any more.
I've imported a bacpac of the database in production and started locally debugging. When trying to access the Content an exception is thrown right here:
And, if we look in the database, the Orchard_Framework_ContentItemVersionRecord table contains a duplicated item with the same version Number, both are "latest version" and they both have the same ContentItemRecord_id.
My concern now is how should we fix this without causing any side effect somewhere else, since I don't fully understand how Orchard manages relations between items, parts, and versions.
Solution proposal:
It seems natural and obvious to manually update the "is latest version" of one of the items to false and increment the version number of the latest one.
Is this solution right or will I cause a side problem?
Have you experienced this before?
Do you know if this is caused by a wrong way of defining the model or something I can do to prevent this from happening again?

Quick answer: it is probably due to double clicking the publish button... Small tip and hack: hide publish button on click...

I remember that happened to me once before, it was ugly situation and a lot of debugging had to be done to find the cause.
The only fix I could find back then was to alter/edit/fix the db data manually.
I must ask
did that error happen once or does it happen all the time?

Related

SharePoint Quick Part Label Stopped Working

We are currently migrating our EDMS into SharePoint. As part of this workstream, I recently set up a SharePoint site with a Quick Part Label containing just the version number - as per the instructions here.
This worked fine in testing, now a few users have been added to the site and the migration works have begun. The option for "Label" within Quick Parts has simply dissapeared.
I tried some trouble shooting on Friday and found the following:
Recovering an old document from the recycle bin, still contain a correct version number label.
This label can be copy and pasted to a new document, and it correct applies the label quick part with the new documents version.
I set up a new test site and the Quick Part Label behaved exactly as expected, meaning the issue is within the Live SharePoint site itself.
I turned off labels and reset them. With no success.
I am opening in the app, the library has minor versions, check-in/check-out turned on (and currently approvals are turned off).
I also suspected that OneDrive sync might cause issues, but this again didn't seem to solve anything in the test site.
NB: this is also posted here, I will keep both threads up to date.
Screenshot showing label missing
Update 20/12/22
Since this morning I have now taken the following additional steps:
Added a new content type
Recreated the label for that content type
Change the content type of the document in the library, and the label
option now appears
This seems like a fix, but I am also curious as to limitations of
this method.
Limitations noticed so far: cannot edit SharePoint columns in the
details pane

"You must save the changes before you can convert this activity" on Fax entity

As you can probably take out from the title, I have a problem on my CRM environment converting a fax entity to an incident (case), it is as you know an out of the box functionality. When I press the button on the ribbon to convert it to a case, I'm given the following error: "You must save the changes before you can convert this activity". And I have definitely saved everything before I do this.
I do have the latest rollup and it works for the other activity entities except from this one. Is there any chance someone had similar issues? If so could you share how you resolved this. Thanks in advance.
There is likely some code running on the form that updates one or more values on the page automatically. Code like that will cause the form to become "dirty". Which is what triggers the message you are seeing.
One way to solve it, is modify your code to perform a save after it make its changes.

Iterators from the same ViewObject do not communicate

I am using JDeveloper 11.1.2.3.0
I am facing a strange behavior here. I have created 2 AppModules and in each AppModule I have DataControls from the same View Object (not only but also). When I create a new row using Page1 for example using DataControl from AppModule1 and then navigate to Page2 that uses DataControl from AppModule2, the Commit and Rollback buttons are enabled. Even if I redeploy the application in this case I have to Commit also in Page2. If I do this, then the problem will not show any more.
So even through I commit in the first case, I have to commit also in the second page. As I said the EO and VO are the same, just the AppModules are different.
Does anyone know why this happens and/or how to fix this?
If anyone knows that this is a known bug please tell me.
Well I hurried a little, I just found the solution (the problem actually). Apparently different app modules are completely ignored one by other and have their own db connections. The explanations is here:
http://www.jobinesh.com/2010/03/what-you-may-need-to-know-about-nested.html

What would cause channel entries to no longer parse after an update (2.3.1 to 2.5.3)

I'm in the process of updating a client's site to the latest version of EE, and while the update went pretty smoothly, {exp:channel:entries} tags no longer render anything inside of them, yet I see that the date on the entry is current or a previous date, the status is set to open, and yes, dynamic="no" was already set. I can't imagine what would cause this, and a database export reveals that all the channel entries are there. The pages aren't completely blank; the templates themselves render without a problem, it's just the {exp:channel:entries} tags so far.
Is there anything I can do to test against this? Running the query module with:
{exp:query sql="SELECT * FROM exp_channel_data "}
{title}
{/exp:query}
returns with a hashed value of M00o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr.
I've only ever seen that error when Structure was involved.
after doing some digging, it turned out that when I turned off my extensions, the content showed up. As a result, I tried disabling extensions, one by one until the culprit revealed itself to be Solspace's Supersearch. It was a previous version of the addon, and updating it to the most current version brought everything back!

Xcode4: two entities with "required" relationship ... failing to be maintained by Core Data?

EDIT: might be fixed in latest Xcode 4.0.2 (just released) - I'm downloading this out now, and will re-edit once I've tested it.
Create two entities (call them "Manager" and "Employee", to stick with Apple's docs).
Create a relationship, "worksFor" from Manager (1) to Employee (many), and mark it as "not optional". (you'll probably need to create 2 relationships, mark 1 as inverse of other)
Hook up an interface using IB, according to Apple's original docs (NB: these don't work any more, but here's an almost exact recreation of the basic setup in Xcode4: http://rgprojection.blogspot.com/2011/04/xcode-4-and-core-data-macos-x.html) and use Bindings (as described in the linked post) to create/add/delete the objects.
Now try to save. ERROR: "worksFor is a required property".
In previous versions of Xcode, this worked as expected: you'd told Xcode that there was a bidirectional relationship, you told it that it was required, and so when it added the "Employee" to the "Manager", it automatically hooked-up the inverse.
Has anyone else worked out how to make Xcode4 do what it's supposed to? Is it an Xcode4 bug? I know that some of the CoreData support in Xcode4 has been deleted, with no replacement (yet), so I'm wondering if this has been deleted too?!
EDIT: here's another project, one I made from scratch, same problem. Although (xcode4 bug, definitely!) this time I created the Relationship in the "grid" editor view rather than the "tree graphical" view... and the generated source code for objects was different (should not be the case, obviously)
second project screenshot
EDIT2: StackOverflow was showing the screenshot above, but has now removed it, you'll have to click on the link. Sorry.
I haven't seen the problem you describe and I've created several data models under Xcode4. It appears to work just like it did in previous versions in that regard. I think you've got something else going on.
Xcode 4.0.2 seems to have fixed the problem - everything works as expected now, with no changes to code :)

Resources