Sitecore.Ship icon indicating copy to clipboard operation
Sitecore.Ship copied to clipboard

Missing "Media" field value of image items after smart publishing

Open afengisme opened this issue 7 years ago • 2 comments

Hello, We use Sitecore 8.2 rev. 161221 with sitecore.ship installed for CI deployment and publishing, we meet a curious issue as followings:

Our site has only one language version for all items including Media Library items, that is "en-US", after installing the .update packages in the instance by http:///services/package/install/fileupload in CI process, then calling http://*/services/publish/smart with posting the forms "source=master,target=web,language=en-US" to do the publishing.

Then we found the issue: The "Media" field value of image items with en-US version in Web database has gone.

Two approaches can fix this issue, but we still don't know the root cause: 1> Add "en" language version for the image media items, yes, adding "en" language version for them, I don't know why this can fix the issue. 2> Do "full" publishing.

If we do the publishing manually via sitecore client by clicking "Publish", there is no this issue.

Any ideas? Thanks

afengisme avatar Jan 08 '18 08:01 afengisme

You will find the answer to your question is you look at the source code of the publish command. Here: https://github.com/kevinobee/Sitecore.Ship/blob/develop/src/Sitecore.Ship.AspNet/Publish/InvokePublishingCommand.cs#L93

The name of the parameter is languages and it defaults to en if it can't find anything.

pveller avatar Jan 08 '18 12:01 pveller

Thanks @pveller for your replying,

I tried to do the publishing as below for "en-US" using "targets" and "languages" .\curl.exe --show-error --silent --connect-timeout 300 --max-time 9000 --form 'source=master' --form 'targets=web' --form 'languages=en-US' http://xxxxx/services/publish/smart

Seems it never starts the publishing, I did not find any sitecore publishing logs brought by above command.

Checking the last completed publishing by: .\curl.exe --show-error --silent --connect-timeout 300 --max-time 900 http://xxxxx/services/publish/lastcompleted/master/web/en-US

the returned value is less than the one returned by launching the publishing command all the time, looks like the launching publishing command did nothing.

afengisme avatar Jan 09 '18 07:01 afengisme