OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Preview Draft button does not format according to the Preview Part pattern

Open Cinnam00n opened this issue 1 year ago • 4 comments

Issue

After configuring Preview Part in a created content item I succesfully managed to use Preview button in the content item editor to view the item in a correct Razor page as defined in the Preview Part pattern.

However, when using Preview Draft for draft items from the list of content items I find the page is not formatted according to the pattern. The URL of the preview is different than that of the published item, i.e.:

Correct published item preview: /OrchardCore.ContentPreview/Preview/Index/88bb3941-ae89-4b1f-b3e7-9acb89dd86f1 Incorrect draft item preview: /Contents/ContentItems/41dhaar3h92axskr0emd0w0cx4/Preview

Expected behavior

Preview draft items correctly according to the pattern of the Preview Part.

Cinnam00n avatar Jul 21 '22 12:07 Cinnam00n

Can you fix this?

hishamco avatar Jul 21 '22 13:07 hishamco

@hishamco I still have trouble running the full source code using Visual Studio (too much memory consumption).

I'll try to configure the development environment using VS Code, then I might attempt to fix this.

Cinnam00n avatar Jul 21 '22 16:07 Cinnam00n

I still have trouble running the full source code using Visual Studio (too much memory consumption).

You can unload unnecessary project (not editable), then you can run Orhcard.Cms.Web which will reduce the amount of memory required. FYI you may need to build the source for the first time from the CLI

hishamco avatar Jul 21 '22 18:07 hishamco

FYI you may need to build the source for the first time from the CLI

This might be the missing piece of this puzzle. I'll try, thank you.

Cinnam00n avatar Jul 22 '22 08:07 Cinnam00n