Modifying the orbeon-resources-private.jar files causes white screen - orbeon

I am trying to create my own custom components in orbeon.
I have been following the steps from the documentation and it said to unzip the jar file 'orbeon-resources-private' I did that and done what I needed to do inside the folder. I then zip it back up into a jar file and copy back over to orbeon.
When I start orbeon back up all i get is a white screen. I check the console and see I am getting a GET 404 not found. What the hell.
Next I put the original jar back and it worked again. So now I unzipped the jar and just zipped it back up again. (Surely that will work). Nothing, still a white screen.
Why cant I put another jar bar the original to get it working.
(I have tried creating jar from command line, zipping it and changing file extension, just adding .jar to a folder, all dont work.)
Could really use some insight to this...
Thanks

Which documenation page are you referring to?
I don't know why you would want to modify the orbeon-resources-private.jar.
You can put your own components into WEB-INF/resources or you can configure another path as documented in Overriding or adding resources without changing Orbeon Forms.

Related

JSON Error: Files or directories outside directory

I tried to submit an Edge extension. It is a simple extension that had three files: the manifest.json, background.js, and an icon.
When I sideload it in Edge, it works. When I tried to publish it, I got an error that says, Files or directories outside directory.
I have looked everywhere for documentation on what the folder directory should look like. Can someone point me to an example directory? Should there be more folders?
The solution was to create a zip file in another way. I found an online site, but if this was something important, I would find another computer.
Anyway, it seems that Big Sur adds something extra that MS doesn't like. Strange Google accepts it.

CN1 - unable to use localization after activating css

Recently I switched over from the legacy css integration to using the current method of css support via the CN1 Preferences dialog. Ever since then, I've had repeated problems accessing strings from the localization resource file.
A few important points:
I have two theme files, but even importing the strings as a csv file into the theme generated by css doesn't work
I've tried all possible combinations of theme initialization with the two theme files, including initializing just one of them, with no consistent success (occasionally it works, but then if I modify the css and the theme file gets regenerated it stops working again)
I created a brand new project and copied my code into it, imported the string files, and it worked - until I turned on css support. Then I was back to square one
When it fails to work, the method UIManager.getL10NResourceNames() returns an empty array
Any help would be greatly appreciated!
CSS controls the file and as a result you can no longer change the theme.res file by other means. You need to keep a separate localization.res file and load that strictly for the localization functionality of your application. You can use Resources.open("/localization.res") to load an arbitrary resource file.
After much poking around, I found the solution. It turns out my situation was the result of a few non-standard things I did. First of all, I had a theme.res file which I renamed using IntelliJ's Refactor >> Rename function, which renamed the hardcoded css theme name in the build.xml file to my new name. I needed to manually revert that string in order to prevent the css compile task from overwriting my theme file. The second thing I noticed is that sometimes (I'm not clear on what caused this) the theme file was not being refreshed in the /out directory when running the app locally. This would manifest itself, for instance, when I would add an image in the theme file, but when running the code it wouldn't be able to find it in the Resources hashtable. Every time this happens, I now know to just delete the contents of /out, thereby forcing the IDE to rebuild/recopy the theme file (I could probably just copy it manually to the /out directory, but I think deleting it is safest).

Using Backload to upload image to project file but images do not appear until project is rebuilt

Using MVC 4 I downloaded Blackcity Backload from nuget, I am trying to save the uploaded images to a file that is within my project. Everything works great and it shows that the image uploaded, except for the fact that after you upload a new image, and refresh the page the image does not appear in the list of returned images even though it was saved. Also if you delete a file it comes off the list at first but again if you refresh the page it is back. If you rebuild the application then everything appears as it should and the images in the backload file list are all listed correctly and they match what is in the actual file.
I thought it may be a server cache issue but I did all i can to prevent the server from caching and still same problem.
I think it may have to do with the fact that Backloader is dynamically creating folders to put the images in and they are not included in the project even though they are in the file structure. So since they are not part of the project they are not being returned in the get request. Its not until you rebuild that they are recognized as part of the project.
Is there a way to dynamically include new files in the project without rebuilding?
Please help. This is killing me.
Ok this is solved. Had to remove filters.Add(new AuthorizeAttribute()) from my global filters and then add [Authorize] to each controller and it worked.

XNA XACT Where do I place the .xap file?

I've been trying and looking on the internet for ages now, but where exactly do you place the .xap file? I've read that you should place the file in your content folder, but I have a content folder located in;
TheGame\TheGameContent\
But I also have;
TheGame\TheGame\bin\x86\Debug\Content
Which is it? If I add the .xap file to the latter it recognises it when I refresh the solution explorer, but the former does not.
However, if I add the .xap to the latter it gives an error saying it can't find it when I use the following line of code to access it;
ae = new AudioEngine(#"Content\game_content\audio\xact\Win\xna xact file.xgs");
This line apparently gets the \x86\debug path.
Any advice?
Thanks
Visual Studio, go to the Solution Explorer and right click the Content solution (i.e. "TheGameContent (Content)") or a folder in that section and select Add > Existing Item... and select the .xap file. If it isn't in there, it will copy the file into TheGame/Content, but it will also make it ready to load and work within your project.
Basically it's the same as adding an image file to an XNA project, and it will save you all that trouble you are having.

How to show only the link of an uploaded file, not its location

I have used paperclip to allow me to upload files to a rails application. Everything works and the file is uploaded, but instead of seeing a link to the actual file itself I see the location of it within the systems folder of the rails project.
I'm guessing its either a routing issue or I need to create a link to the file in question. However, I would like to hide the location of the file itself, and only see the link displayed.
I would be very grateful if someone could point me in the right direction here.
You want to hide the actual path of the file in the server, right?
You can achieve that using send_file (http://api.rubyonrails.org/classes/ActionController/DataStreaming.html#method-i-send_file) in a normal controller.
You will still need to do something to protect the download using the real path.

Resources