Coder Social home page Coder Social logo

jbluemink / find-overwritten-sitecore-resource-items Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 1.0 759 KB

IAR Sitecore items can be overwritten by a database item, With the Sitecore PowerShell report you can easy find the item and delete/restore or compare the item as resource

C# 100.00%

find-overwritten-sitecore-resource-items's People

Contributors

gurligebis avatar jbluemink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gurligebis

find-overwritten-sitecore-resource-items's Issues

When running in Sitecore Managed Cloud PaaS, files are ignored

Hey,

When running in Sitecore Managed Cloud PaaS, the following is how the paths are defined:

<filePaths hint="list">
  <filePath>D:\home\site\wwwroot\App_Data/items/$(id)</filePath>
  <modulesFilePath>/sitecore modules/items/$(id)</modulesFilePath>
</filePaths>

This causes all files inside App_Data to be ignored, since Sitecore.IO.FileUtil.MapPath is called on it.

Instead, you should test if the path is absolute, and if that is the case, don't try and map it, but just use it as-is.

One way to test for it might be to test for a colon, since that would only be there in case of an absolute filesystem path.

Write-Host "path in config $filepath"
if ($filepath -like "*:*") {
    $serverpath = $filepath
} else {
    $serverpath = [Sitecore.IO.FileUtil]::MapPath("~/$filepath")
}
Write-Host "ServerPath = $serverpath"

The above is tested, and solves the issue.

Support for Sitecore 10.1

Hi there,

Interesting module.
How come that this module does not support Sitecore 10.1?
Is that complicated to have it working for 10.1?
Maybe can you give me some hints on how to update the scripts in order to do so?

Thank you,
Sebastian

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.