U4-11282 - Problems with publishing, unpublishing, saving drafts, for variant, non variant content types and property types

Created by Shannon Deminick 30 Apr 2018, 09:42:32 Updated by Shannon Deminick 15 May 2018, 10:31:13

Subtask of: U4-11278

There are all sorts of issues with different scenarios of publishing, unpublishing, saving drafts for variant, non variant content types and property types

1 Attachments

Download Null ref StackTrace.txt

Comments

Shannon Deminick 10 May 2018, 12:09:21

PR is here https://github.com/umbraco/Umbraco-CMS/pull/2621 and contains the PR for http://issues.umbraco.org/issue/U4-11227 (lots of changes but I've already reviewed the ones for 11227)

Testing Notes A:

''This is to setup the data structure and we'll test along the way''

*Create 3x languages: en-US (default/mandatory), es-ES (mandatory), fr-FR *Create a document type (A) with language varying enabled **Create a textbox property with language varying enabled, with required validation **Create a textbox property without language varying enabled, with required validation *Create a document type (B) without language varying enabled **Create a textbox property (by default you won't be able to enable language varying because the content type doesn't allow it) *Allow document type (A) as a child to the (B) *Allow document type (B) as a child to the (A) *Create a document of type (A) at the root called 'Home', don't publish, just save (you can only create a draft of the default language which should be en-US) **Assign 3 domains: localhost:8000/en = en-US, localhost:8000/fr = fr-FR, localhost:8000/es = es-ES **Switch to es-ES (the other mandatory variant), make the name something Spanish, fill in all fields, publish it (only select es-ES) ... it should fail since en-US is required **publish again, but select both en-US and es-ES, it should work **check the URLs generated, you should see two, one for /en and one for /es **switch to the fr-FR variant, make the name something French, fill in fields and publish it, you should now see 3x URLs *Create a child document of type (A) under 'Home' called 'About Us', adjust the names so they match the languages (for testing purposes), fill in all fields and publish all variants *Create a child document of type (B) under 'Home' called 'Office Locations', fill in all fields and publish ... there are no variants for this so it should be like a v7 experience. You will have 3x URLs, each URL segment will be named it's language equivalent except for the last which will just be 'office-locations' since it's invariant

Testing Notes B:

''Now we can test out the templates and draft changes''

*You'll have 2x templates, one for each of your doc types created, update both templates to have this markup: https://gist.github.com/Shazwazza/77ce0a947428faadb2b015bcbce933de *Navigate to your home page english link and you'll see a page with a menu structure, a language chooser and a listing of culture name information and property value information. You can click through the nav and it should all work, you can change languages with the language changer and it should all work ... NOTE: The language changer doesn't work on 'office locations' since that is invariant! it's actually not a bug, it's just the way i implemented it **Verify all property values are correct and notice that no matter which current language you have selected the invariant property value for the (A) documents is always the same and the values on the invariant document type (B) are always the same *Now go change a the property values on the Home page but save a draft (don't publish) **View the home page and you should see the published values still remain **Publish home and view the page and you should see the published values updated

Testing Notes C:

''Now to test some publishing bits''

*On your Home page, go to es-ES and unpublish it. This is a required language so it will unpublish the entire doc, NOTE: You may be a YSOD here, something about URLs but lets not worry about that right now, if that happens reload the browser. Now you should see in the URL listing that it says the document isn't published. **The Home page tree node should be greyed out now too *On the child nodes, look at the URLs, they won't be listed since the Home is not published. NOTE: There's an issue there too, you'll probably see a message like "Could not get the URL" ... something we need to fix later *Go to view the home page localhost:8000/en ... you'll get the standard 'no nodes' Umbraco page since nothing is published *Now publish Spanish for Home again, it should succeed. Notice you didn't have to also publish English too? That's because English itself is already published, when Spanish was unpublished, that variant was unpublished and then the document itself was unpublished because Spanish is required but it didn't touch the state of English. **The home page node will no longer be greyed out

Testing Notes D:

Just give a few things a try and see what happens!


Robert Copilau 14 May 2018, 06:49:29

@Shandem, I could not get the URL's to generate which means I did not get to test scenario B. The rest worked fine, It will need some more testing as I only had the chance to test it a bit on Friday.

I'll try again today when I will find some time as I will be on Huntsman.


Robert Copilau 14 May 2018, 07:54:46

Update: It seems to work when I tested on a fresh clone. Will come back with more info once I am done with all scenarios.


Robert Copilau 14 May 2018, 08:24:52

A couple of issues: *Un-publishing the SP language will throw a null ref exception (cache related) but will work as described *Un-publishing the other mandatory language (ENG) will only unpublish the English variant

UI issues: *Mandatory "check mark" on the mandatory languages does not seem to be on when you inspect the language unless is also set to default.

@madsrasmussen will be testing too, maybe he can confirm the above.


Mads Rasmussen 14 May 2018, 09:58:15

Here are my test notes. In general, everything works as described. I haven’t looked at the code but if we are confident everything is ok we should just get this PR merged so it isn’t blocking and then we can start with smaller improvements. Detailed testing notes below and a list of things I think we can improve at the bottom.

'''For Testing A'''

  • Create languages - Works
  • Create Doc types - Works
  • Create Home node - Works
  • Assign hostnames - Works
  • Try to publish without mandatory language - Works ** I was a little confused by the validation message first. But I think it might just be the wording of it. It felt a little weird the message showed up on one of the other languages that I didn’t want to publish. I think we can fix it with a “required” label on the mandatory field and a little different wording.
  • Generated URLs - Works
  • Sub nodes - both with variants and without variants works.
  • Generated URLs are correct.

'''For Testing B'''

  • Markup works ** I can see language selector ** The variant values change based on language ** The invariant values stays the same ** The invariant page doesn’t have the language selector + field value is correct
  • Drafts - Works ** Site doesn’t show draft update ** Publish dialog shows correct pending changes status for the language ** Site is updated correctly after publish

'''For Testing C'''

  • Unpublishing a mandatory language unpublished everything - Works ** After unpublishing Spanish the languages state is "Unpublished (Pending Changes)”. It should just be “Unpublished" ** English and French are correctly updated to “Unpublished"
  • URLs on child nodes are gone
  • No Nodes page is shown when Spanish is unpublished
  • Republishing Spanish works. I wouldn’t expect it to also publish “English” and “French” at the same time. I would expect the states of these languages to be “Unpublished”.
  • Tree is updated correctly

'''Things to improve''' These notes are not holding the merge back but are just things we can do to improve the experience.

  • Validation messages in publish dialog
  • We should show a required maker for mandatory languages in the publish dialog
  • It is a little confusing that you can’t see all allowed languages when creating a document. Either the drop-down should be totally gone or we should show all the languages.
  • When creating a new node - all language status’s says: “Unpublished (Pending Changes)" ** It should only be the one I have just saved ** The other ones should be left empty or “Not created” or something like that.
  • Consider renaming the Status: “Unpublished (Pending Changes)” to “Draft"
  • The unpublish dialog should make you aware that unpublishing a mandatory language unpublishes everything
  • After unpublishing a mandatory language the name language drop-down says “Unpublished (Pending Changes)”. It should just be “Unpublished"
  • Republishing a mandatory language shouldn’t also republish other languages.


Shannon Deminick 15 May 2018, 10:31:09

Have merged the PR, I've created this task for the list of improvements http://issues.umbraco.org/issue/U4-11340


Priority: Normal

Type: Task

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint: Sprint 85

Story Points: 3

Cycle: 10