1

I am trying to remove/delete a CustomSite from a Scratch Org.

I've done a source:force:pull to get the metadata onto my local machine, then I've deleted the .site-meta.xml file such that source:force:status returns:

STATE          FULL NAME   TYPE        PROJECT PATH
─────────────  ──────────  ──────────  ──────────────────────────────────────────────────
Local Deleted  site        CustomSite  force-app\main\default\sites\site.site-meta.xml

But when I run:

source:force:push

I get error message:

TYPE   PROJECT PATH                                            PROBLEM
─────  ──────────────────────────────────────────────────────  ────────────────────────────────────────────────
Error  force-app\main\default\sites\site.site-meta.xml         insufficient access rights on cross-reference id
ERROR running force:source:push:  Push failed  

Note: the site is deactivated.

Question

  1. What is causing this error?
  2. Is there a related record I need to delete before I can remove the site?
  3. Is what I am doing even possible?
  • Check if a site/the site is deletable via the Setup UI. If not it is likely that delete is not possible. And if it is possible, you may get a clearer error explanation. – Keith C Nov 21 at 15:15
  • Hi @KeithC, thanks, there isn't a 'delete' button as far as I can see. – Robs Nov 21 at 15:26
1

Deleting a force.com site is still not allowed, here is the relevant idea: we should be able to delete force.com sites

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.