Jump to content

Community

Files in the "interface" folder and CIC clients.


Martin A.
 Share

Go to solution Solved by Daniel F,

Recommended Posts

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.

Link to comment
Share on other sites

Are they just JS and Image files? If so, you have a few options:

  1. 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.
  2. 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).
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Solution

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.

 

 

Link to comment
Share on other sites

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 by All Astronauts
Link to comment
Share on other sites

@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 by All Astronauts
Link to comment
Share on other sites

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

 

Update: We've been listening to the feedback and are working on a solution to make the /interface folder accessible again our Cloud infrastructure.
This means, any JS, HTML, GIF files uploaded there will work, even PHP will work, BUT you'll have no access to the IPS framework there.

Link to comment
Share on other sites

  • 4 months later...

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?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy