Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing Publish-Item against Experence Edge throws an error #1314

Closed
3 tasks done
RAhnemann opened this issue Sep 6, 2023 · 3 comments
Closed
3 tasks done

Executing Publish-Item against Experence Edge throws an error #1314

RAhnemann opened this issue Sep 6, 2023 · 3 comments
Assignees
Labels
🐞 bug Oops! Sorry for the inconvenience.
Milestone

Comments

@RAhnemann
Copy link

RAhnemann commented Sep 6, 2023

Expected Behavior

Item is published to Experience Edge

Actual Behavior

"Publish-Item : Object reference not set to an instance of an object" message is thrown.

Steps to Reproduce the Problem

If your publishing db is named "experienceedge", run:

Publish-Item -Path "Path_to_item" -Target "experienceedge"

It will show the error. If you change your Target to "web" it will work as expected.

Versions

Sitecore PowerShell Extensions 6.4.0.22430
Sitecore 10.3
Sitecore Edge Connector 21.x

*note, if you

  • Tested issue with clean install of Sitecore and the latest available version of SPE.

  • Asked questions on the Sitecore Slack Chat channel.

  • Reviewed questions and answers on the Sitecore Stack Exchange.

@RAhnemann
Copy link
Author

image

@alan-null alan-null self-assigned this Sep 7, 2023
@alan-null
Copy link
Member

@RAhnemann It will be solved in Edge Connector, reported issue for them, id: 597269

In case you have to hotfix your onPrem instance it could be fixed in SPE with these lines:
image

CC: @michaellwest

alan-null added a commit to SXA-DEV/SitecorePowerShell that referenced this issue Sep 8, 2023
@michaellwest
Copy link
Member

Workaround blogged here https://rockpapersitecore.com/2023/09/using-powershell-to-publish-to-experience-edge/

$pItem = Get-Item -Path "master:/sitecore/media library/Project/Tenant/Client/Sitemaps/sitemap"$db = Get-Database "experienceedge"$lang = [Sitecore.Globalization.Language]::Parse("en")​
[Sitecore.Publishing.PublishManager]::PublishItem($pItem, $db, $lang, $false, $false)

@alan-null alan-null added this to the 7.0 milestone Sep 18, 2023
@alan-null alan-null added the 🐞 bug Oops! Sorry for the inconvenience. label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Oops! Sorry for the inconvenience.
Projects
None yet
Development

No branches or pull requests

3 participants