Giter Site home page Giter Site logo

sitecorepowershell / book Goto Github PK

View Code? Open in Web Editor NEW
7.0 9.0 19.0 14.74 MB

Sitecore PowerShell Extensions - The Book

Home Page: https://doc.sitecorepowershell.com/

CSS 73.73% HTML 26.27%
spe sitecore-powershell-extensions windows-powershell sitecore-api

book's People

Contributors

aackose avatar adamnaj avatar alan-null avatar alexkasaku avatar blipson89 avatar bmbruno avatar holtsoftware avatar jaffal83 avatar jeneaux avatar marcelgruber avatar markotsoi avatar michaellwest avatar mrvinaykj avatar ozkansayin avatar robsonautomator avatar samypesse avatar simoncroak avatar strezag avatar twiernik avatar vgbenjamin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

book's Issues

Install-UpdatePackage "Update" parameter does not update _Standard values

Hello,

We have used the below command to install TDS items, however we noticed our _Standard values are not getting deployed.
Install-UpdatePackage -Path $package -UpgradeAction Upgrade -InstallMode Update

The below was the message appearing in the TDS log:
WARN:Field: '[s]Header Description Text[/s]' ([s]{A3253692-ED0F-4931-B9CA-0AE10803D866}[/s])
Item path: '[s]/sitecore/templates/abc/Base/UI/Shared/xyz/__Standard Values[/s]'
Item ID: '[s]{729901BF-551F-4330-A125-A83B57A7B595}[/s]'
Language: '[s]en[/s]'
Version: '[s]1[/s]'
The field has been modified from '[s][/s]' to '[s]Description Here.[/s]'.
The field value will not be changed.

We were able to get it work if it manually install the TDS through the update installation wizard.

Moreover we were able to get it work if we change the parameter from Update to Install.
Install-UpdatePackage -Path $package -UpgradeAction Upgrade -InstallMode Install

Hence just wanted to understand the difference between the two parameters as well as the impact of changing it.

Thanks
Ritesh

Link is 404ing

We've built quite a few reports, many similar to the [Advanced System Report](https://github.com/SitecorePowerShell/Book/tree/9c7126d7a38df6ef372e8baef52f9a02baabd550/modules/integration-points/reports/[https:/marketplace.sitecore.net/en/Modules/A/Advanced/_System/_Reporter.aspx]) \(ASR\) module.

Add url examples to the book.

$site = [Sitecore.Sites.SiteContextFactory]::GetSiteContext("usa")
$url = New-UsingBlock (New-Object Sitecore.Sites.SiteContextSwitcher $site) {
    $pageItem = Get-Item -Path "master:" -Id "{50BE527C-7241-4613-A7A9-20D0217B264B}"
    [Sitecore.Links.LinkManager]::GetItemUrl($pageItem)
}

$url = New-UsingBlock (New-Object Sitecore.Sites.SiteContextSwitcher $site) {
    $mediaItem = Get-Item -Path "master:" -Id "{CBE06C33-59DE-4B34-968D-19EBA886BC84}"
    [Sitecore.Resources.Media.MediaManager]::GetMediaUrl($mediaItem)
}

Content Editor warning code is executed for latest version(not for selected)

Narrative:

I as Content Editor want Sitecore Powershell Warnings to be executed for the selected item version.

Steps to reproduce on 'Elevated Unlock' as an example:

  1. Create 2 Sitecore users: user1 and user2.
  2. Assign sitecore\Sitecore Local Administrators role to these users
  3. Login as user1
  4. Create some item
  5. Create 5 versions of this item
  6. Switch to 2 version. (Version number doesn't matter. It should be not the latest one)
  7. Lock this item version for editing
  8. Logout
  9. Login as user2
  10. Navigate to item create on step 4
  11. Switch to 2 version. (version from step 6)

Expected result:
Warning 'Elevated Unlock' should be shown. Message 'Use elevated privileges to unlock the current item.' should be present and 'Unlock' button should be available to unlock this version.
Actual result:
Warning 'Elevated Unlock' is absent

Investigation result:
Enable rule takes current item using $item = Get-Item -Path "." code, which ignores the version.
However, I looked on Spe.Integrations.Pipelines.ContentEditorWarningScript implementation and it looks like only path is transferred to SPE, via scriptSession.SetItemLocationContext. That is why the fix should contain 2 parts:

  1. Passing item version to script session
  2. Getting item version from context and execute 'Enable Rule' using that version

Set-User without -Email property is removing email address from profile

Hello -

The email address field value is getting deleted from the user profile when using Set-User.

Note that in the code below, the -Email property is not set in Set-User, which is not a required property .
'foo' does exist as a custom property on the profile.

`$users = Get-User -Filter $userFilter
foreach ( $user in $users )
{
$profile = $user.Profile
$identity = $profile.Username

Set-User -Identity $identity -CustomProperties @{ "foo" = "bar" }
}`

This occurs in SPE 5.1.
Thanks (again) for this awesome module for Sitecore.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.