This is in a SharePoint online environment.
I have created a publishing page in a pages library in a sub site. On this page, I have dropped a content editor web part which points to an aspx page in a style library at the site collection level. This aspx page is from a simple angular application that renders content. It will eventually be expanded to do more. Once I do this, I click apply or ok on the content editor web part and my angular app renders properly on the publishing page. So far, so good.
Now on top of the page in the ribbon, if I save or check in, I get a page not found error. In the URL for the error page, the request it cannot find is wrong. Somehow, this request is getting malformed along the way.
My aspx page for my angular app exists here - https://sitecolletionname/Style%20Library/Scripts/ngApp/index.aspx
My publishing page that I'm building is here - https://sitecollectionname/subsite1/Pages/ngAppTest.aspx
When I save or check in, I see this in the page not found url - https://sitecollectionname/Pages/PageNotFoundError.aspx?requestUrl=https://sitecollectionname/style%20library/scripts/ngApp/ngAppTest.aspx
As you can see in the requestUrl querystring parameter, it's trying to render a page which truly does not exist. It takes the url of the aspx page to my angular app and changes the name to the actual publishing page.
At this point, I have to check in the page from the default view of the pages library. However, if I try to do any more editing on the page, I end up on the page not found page. So essentially, I cannot use the page any more.