Martin A. Posted September 30, 2020 Posted September 30, 2020 Hi, Tried in a ticket (#68225), but Rhett wants me to get developer assistance here instead. There is an issue with Community Map where one of your CIC clients is getting a 404 from all the files it's supposed to serve from the interface folder. This is where I store the LeafletJS files and plugins. I am not sure how I can debug this issues, which to me seems to be isolated to CIC customers only. There's currently 20 purchases of this file, where 19 of them work perfectly fine, not including all my local test installations. My initial thought on this was that it could be related to how you changed where application files are stored for CIC2 customers. IPS haven't posted what this change is all about, other than that we should use "\IPS\Application::getRootPath()" from now on. But there is obviously something happening with the installer that prevents these files from the "interface" folder to be added to a web-accessible place, or not adding them at all. I have confirmed that these files do exist in the .tar file. I don't know what else I can do.
Ryan Ashbrook Posted September 30, 2020 Posted September 30, 2020 Are they just JS and Image files? If so, you have a few options: You can add them as Resources to your application (resources do not necessarily need to be images - they can be anything from images, fonts, JS, etc.) and then load them via the {resource} plugin. Any reason you're not using the hosted version? Leaflet seems to offer several free CDN's for hosting: https://leafletjs.com/download.html - using a hosted option means you only need to keep track of the version to include in your app, rather than needing to update the entire file itself. It'll also reduce the size (though, in this case, not likely enough to make a big difference).
Martin A. Posted September 30, 2020 Author Posted September 30, 2020 Not all plugins are available in the cloud. And I might be old school, but I would prefer to keep these in the package, as that makes me in control over what version it's running and that nothing breaks. Serving the base Leaflet library from a CDN should be OK. If that's "the norm" these days I can certainly switch to that. Guess I could point that question back to you; Why aren't you serving your JS libraries from a CDN? And by giving me these options instead of saying that this is a bug, you're really saying that the interface folder is off limits from now on? Where did you publish this?
All Astronauts Posted September 30, 2020 Posted September 30, 2020 That response appears to be saying (by not saying...) that CIC users and the interface folder are not gonna fly? Can we get a real answer on this? If the interface folder contents for apps is not going to install for CIC users a lot of us have a lot of work to do. If this is just a hitch with Community Map then carry on but otherwise we are all going to need clarity here. G17 Media 1
Solution Daniel F Posted October 1, 2020 Solution Posted October 1, 2020 Short update on the issue: This is indeed a limitation which we've just noticed ourself, We're looking at this right now and investigating possible solutions. In the meanwhile I would suggest to stop using the interface directory at all, and instead use controllers for the PHP logic and official CDNs or the application resource system for any other files. I'm going to explain this further in the upcoming September Marketplace Recap topic which will be published on Monday.
All Astronauts Posted October 1, 2020 Posted October 1, 2020 (edited) Thanks for the update. Would prefer we actually end up with a solution that provides a certain always-local (not off-server S3 or whatever) source to load "stuff". My reason is CORS madness and though that's not something that is necessarily IPS's problem to manage on end-user sites, it is a thing we'll hit if we lose the Interface directory as we will go from always loading and working as our things are loading from the local server to maybe/maybe not working depending on the FileStorage location being local or not and now we are getting yelled at and having to deal with all that stuff. Others may have different reasons. Edited October 1, 2020 by All Astronauts G17 Media 1
Martin A. Posted October 7, 2020 Author Posted October 7, 2020 On 10/1/2020 at 7:59 PM, Daniel F said: Monday. The arrow points at Monday. WP V0RT3X, G17 Media and Ilya Hoilik 3
Ilya Hoilik Posted October 7, 2020 Posted October 7, 2020 9 hours ago, Martin A. said: The arrow points at Monday. That's how you should understand Invision Estimates WP V0RT3X, G17 Media, Martin A. and 1 other 4
All Astronauts Posted October 8, 2020 Posted October 8, 2020 (edited) @Daniel F Let's get some hard clarifications please. For any submissions going forward, we will have to have completely removed the interface folder and any/all contents within? I do not want to nuke the interface folder, make all the changes, submit, and then find out nope, we aren't ready for the interface folder to be missing. Additionally, will a missing interface folder be "ok" for those on 4.5.0, 4.5.1, 4.5.2, 4.5.3 or is the installer going to just choke on it? EDIT: For those that didn't peak in the dev communications forum, Interface is dead now. I'm just gonna go ahead and cue up a large popcorn for when people start thinking about their apps (customs or otherwise) that have 3rd-party PHP libraries in interface. 🍿 Edited October 8, 2020 by All Astronauts Sonya* 1
Daniel F Posted October 9, 2020 Posted October 9, 2020 On 10/8/2020 at 8:53 AM, All Astronauts said: For any submissions going forward, we will have to have completely removed the interface folder and any/all contents within? No
All Astronauts Posted February 12, 2021 Posted February 12, 2021 Any update on this? I don't think the over all problem with losing interface was with files that can be run through resources with little problem (single html, gif, even js), but more with including full 3rd party PHP libraries into our projects. We can brute force them into the source directory but that is an awful lot of hell modifying all the individual files to work within that structure, if it is even permissible per library license restrictions. Could you also better explain what you mean regarding HTTP access to the files in this new system you have cooking, and what no access to the framework means?
bfarber Posted February 12, 2021 Posted February 12, 2021 Imagine that your files are stored above the web root directory, basically. 🙂
Recommended Posts