When I remove a component in Sitecore from the Experience Editor, it is removed from the page but in Content Editor the component and its datasource still here! Does anyone have a solution for this? Thank you.
Related Questions in SITECORE
- How to Customize Sitecore Copy operation
- Joomla 5..0.3 delay in search
- What's the event for when a Branchitem has finished creating?
- Convert Sitecore data sources to Guid, programatically
- How to specify an existing ItemId While uploading Media Items to Sitecore XM Cloud using UploadMedia mutation?
- Sitecore to WordPress migration
- Why changing template in Sitecore using powershell script creates a version in English language even if there no version exists?
- I want to convert sitecore search facet filter from multiple to single
- Sitecore - select fields and write to an excel sheet by changing the field names in Powershell
- Coveo for Sitecore: Precondition failed: The parameter 'p_ApiKey' must not be an empty string
- In Sitecore 10, why would my Content Editor Panel not open
- Not loading CSS files after login to my sitecore instance
- AWS - Amazon.Extensions.S3.Encryption.AmazonS3EncryptionClientBase is attempting to implement an inaccessible interface
- Cannot use import statement outside a module - jest + nextj.js
- To get the sitecore username who created sitepage
Related Questions in SITECORE8
- Not loading CSS files after login to my sitecore instance
- Coveo Page View Analytics Report
- An error occurred while uploading the image in Sitecore Media Library
- IIS Redirect is not working on Sitecore application
- Language.TryParse Method use in sitecore point of view?
- Multiple fields with same name in Solr
- SiteCore CMS - Webpage Becomes Unresponsive at every click
- Uploading the subtitles along with the video in azure devops
- How to add insert option Programmatically in C# Sitecore
- Error.html page code showing up in meta description of my homepage
- How can i access array value in Site-core Jss?
- Unable to restore nuget packages on Sitecore8.2 build
- What is the use of ToCoveoFieldName method in covoe search in hive framework?
- How can I add custom domain in portal azure?
- Why is my website when using www inaccessible? asp.net
Related Questions in CONTENT-EDITOR
- How to delete an embeded link (content editor) in sharepoint?
- Does Sitecore content editor have native way to display a pop-up box on a page
- Item Tree not being populated from link selector in Sitecore 10.3
- Twilio list-picker shows description after click
- Default ribbon tab in Sitecore content editor changed after adding a button
- How to put/paste the content where cursor is there in content editable div
- Unable to use CSS to remove a button on a toolbar in Sharepoint Web
- WP Content Not Loading in Editor
- Sitecore: target item has no version in this language error
- Hook to item selection action
- Resizing images in contentEditable-div stopped working in Firefox
- Remove component data source in Sitecore
- Add contents to "div element having id or Class" inside TinyMCE editor
- Sitecore 7.2 Content Editor: Long loading time when clicking on an item
- How to add target window as Pop Up for General Link Type in Sitecore?
Related Questions in EXPERIENCE-EDITOR
- Sitecore Experience editor error in xm cloud partial design
- How to make background image editable in Experience Editor in Sitecore using C#
- Restrict media validation to only media library
- While adding a new component to a new page in experience editor not getting added in sitecore 9.3
- Handling or disabling Sitecore field's validation during Runtime
- Sitecore Experience Editor Ribbon not loading?
- Sitecore add here button not showing the Add rendering dialog
- Rendering components are showing up twice when clicked on Add Here button in Sitecore Experience editor
- Sitecore 8.2 - How to share an item page in a multisite context decoupling content from layout
- Remove component data source in Sitecore
- Using RenderImage does not make Image editable in Experience Editor
- Limiting number of characters for sitecore single line text field while editing in Experiance editor
- sitecore experience editor adding new datasource is slow
- Sitecore Experience editor get data source
- Disable Javascript on WebEdit Link in experience editor
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
This is a bit of a tricky one as the datasource might still be referenced by other pages, or potentially by the same page in another version or language.
You could use an event handler implementation to scan the renderings on save and look for renderings that are removed (i.e. were in the original, but not the new version being saved). Then, for each one, check if they are referenced anywhere.
A sample implementation is shown in this blog: http://r-coding-sitecoreblog.blogspot.com/2013/10/cleaning-up-datasource-items.html
The other thing to consider is that your datasource might have presentation itself and may have other datasources it references. So, be sure to consider this scenario when cascading your delete from the Experience Editor.