+ Start a Discussion

Cannot Delete Visualforce Page - dead references bug

I am trying to delete a visualforce page and I have removed all the references to it.

But still, when I try to delete it returns me a list of pages with the message "This visualforce page is referenced elsewhere in salesforce.com. Remove the usage and try again."


These pages have no any reference to the page I am deleting, as far as I know the only way a page can refer to another page is through:

  1. {!$Page.pageName}
  2. <apex:include/>

Is there any other way the page is being referred that I don't know of?


Any help would be appreciated.





     when you delete the Visual force page manually in the Org without any apex code, from which its is being referred.First of all you have to check this.


It could also be referenced as a template or possibly by the urlfor function in an expression.   But if there is really no reference in the pages where it says there is a reference that sounds like a bug.    If that is the case you may need to open a support case.



Andy BoettcherAndy Boettcher

There are many other places that can be referencing a VF page.  I've never run into a situation where there is a "ghost link" that is preventing me from deleting a Page.


Contacting support will help - they may be able to find that link for you.


Check other VF pages, VF components, APEX classes, triggers (hey, it happens), Custom Buttons, Overridden standard buttons, Sites, Portals...


There are a lot of things that can reference a VF page.




Thanks for the replies everyone.


It is clearly a bug, to workaround I have to go to the visualforce page that is listed as having a reference and just re-save it. After saving that page is no longer listed when I try to delete.


But the problem is I have tons of pages listed, so going to each one & saving is time consuming!




Weird, sounds line the reference info got corrupted.   Is this a page that has been around a long time or something recent?  Has the page been renamed at some point?



Yes, all those pages have been there for a long time and no, it was never renamed since day 1. Infact, even renaming a page shows many invalid page references.

Thank you for the solution, I had the same issue and some of the pages where native salesforce pages that we have never touch. Really weird problem.