« 返回到 Staging - 6.0

Staging - 6.0 - Differential Publishing

With Staging enabled, we are able to publish changes between Staging and Live environments. But what if you have a lot of content. Does it make sense to publish it all every time you need to send changes from Staging to Live? Of course it does not.

Differential Publishing #

In Liferay Differential Publishing is implemented as an Export or Publish option called Range which appears in the Export view or in the Publish Options panel depending on which operation you are doing.

Note: This option is set to All when staging is not enabled, and to From Last Publish Date when Staging is enabled.

  1. All - Publish all data since the beginning of time.
  2. From Last Publish Date - Each time you publish successfully, the timestamp of that publish is stored (in the typeSettings of the Layout Set). Thus publishing From Last Publish Date uses the last stored value. (If there currently is no stored value, All is implied.)
  3. Date Range - Choose a time slice between two specified Dates.
  4. Last - Using NOW as the end date, choose the Start Date based on the time slice defined in the selection bellow.
    1. 12 Hours
    2. 24 Hours
    3. 48 Hours
    4. 7 Days

Intricacies of From Last Publish Date #

Now, when you setup Staging all previous "Last Publish Dates" are removed from the Layout Sets to avoid users from not noticing that some data didn't get published. This effectively means that the first publish will be All by default, since there is no previous date stored.

But, subsequent publishes are subject to the default.


"Sometimes my changes don't get published!!!"

Well not everything you think is a change, actually is a change!

What constitutes a Change? #

Definition: Any alteration which causes the entity's

modifiedDate
field to change constitutes a change.

What things are changes and which are not?

Changes

  • change entity field
  • change categories
  • change tags
  • change custom attributes
  • update the status (workflow)

Not Changes

  • comment on entity
  • rate entity

Why are those changes or not changes?

Changes invoke the entity's Service. Anything that does not invoke the entity's service (comments and ratings use their own services) does not update the

modifiedDate
and thus is not considered a change.

If you want to publish an entity when only the comments or ratings have changed, you need to change anything on the entity to flag it as changed, since the Last Modified Date or choose one of the other Range option, like Last - 48 hours, or Last - 7 Days. i.e. whatever range includes the

modifiedDate
of the entity.

1 附件
16007 查看
平均 (1 投票)
满分为 5,平均得分为 4.0。
评论