Edited heavily - Original question below.
I have a custom list (installed from a feature) that is basically a calendar. The default month, week, and day views take advantage of a custom web part that injects javascript into the page for the purpose of adding background colors.
Users who wish to add a Personal View can do so, however the new personal views will not have the custom coloring web part on the page by default. The user can select "Personalize this Page" from the welcome menu and add the web part, but upon clicking "Exit Edit Mode" the web part disappears.
Why is this happening and how do I make it work?
I have a custom web part that injects some script tags onto the page. This web part is intended to be used on custom Calendar list to give some background colors to events of various Categories (a custom field). This works great on Shared Views, not at all on Personal Views.
If I create a Personal View and base it off of the default Calendar.aspx view, and then select "Edit this page" from the Site Actions menu, the calendar disappears. If I add the custom web part to the page and select "Modify this web part" I get the "A web part you attempted to change is either invalid or has been removed by another user."
Is it possible to add web parts to personal views? Is there a better way to achieve this custom background coloring?
UPDATE: The url of a personal view is something like this: .../Lists/CalendarName/PersonalViews.aspx?ShowWebPart={GUID}. If I remove the querystring then no calendar displays, but if I inspect the page contents the web part is actually rendering content! It does not render if the ShowWebPart={GUID} is present. Using the debugger, I see that it does not load at all as far as i can tell.
UPDATE 2: More weirdness. If I customize this page by selecting "Personalize this page" from the welcome menu, it lets me add my custom web part, and it looks great, but only until I click "Exit Edit Mode" and my custom web part disappears again.