Changing Bitnami Open edX Logo - bitnami

I'm new to Bitnami and Open edX and I'm having trouble changing the logo. I'm new at this and was experimenting with adopting the red-theme that comes with it and changing preexisting values for styling (which I did successfully). However, I am unable to change the logo without the site crashing and giving a 500 error after about a minute or so.
This happened when I replaced ~/apps/edx/var/staticfiles/red-theme/images/logo.3364725269f9.png with my own, with the same filename. It's odd, because it works for about a minute or two and looks perfect. But, when I refresh about 3 minutes later, the site doesn't load. I also tried replacing the logos in ~/apps/edx/var/staticfiles/images as well as ~/apps/edx/edx-platform/themes/red-theme/lms/static/images, but nothing has worked.
Lastly, I've tried following the directions here:
https://stackoverflow.com/questions/32900783/open-edx-update-logo
https://community.bitnami.com/t/trying-to-add-organization-logo/41865
https://community.bitnami.com/t/changing-the-open-edx-organization-logo/50790
but to no avail. Each time I change it, I have been recompiling the assets, just to make sure.
Also, this is my first stackoverflow post ever, so please let me know ways I could improve my questions; I'd really appreciate it! Thanks!

Bitnami developer here,
If you access your /opt/bitnami/apache2/logs/error_log file you should see an error like:
The name 'red-theme/images/logo.png' could not be hashed with ...
I was able to make it work by substituting both /opt/bitnami/apps/edx/var/staticfiles/red-theme/images/logo.3364725269f9.png and /opt/bitnami/apps/edx/var/staticfiles/red-theme/images/logo.png, and then update LMS assets by running:
sudo /opt/bitnami/apps/edx/bin/edxapp-update-assets-lms
I hope it helps

Related

Electron Remote Upgrade Issue

I have a working Electron app which I wrote about two years ago. I'm not an employee of a company, but just some guy that wrote an app that a few people use to make the world a better place. Anyway, I need to make some changes to the app but my computer crashed a while back so I downloaded my old code from Github onto my new computer and started to get to work. But immediately I found the app wouldn't work in the new 17.0.0 version of electron because the REMOTE module in Electron was deprecated and then removed in previous versions. I tried to follow the instructions here... https://www.npmjs.com/package/#electron/remote?activeTab=readme to replace REMOTE with the new #electron/remote module. I've had several problems, my most recent is:
JavaScript Error: Uncaught Exception: TypeError BrowserWindow is not a constuctor at app.createWindows (C:...\main.js:89:17).
I use the remote functionality (properties?) over 50 times in my app, including .dialogue, .getGlobal, .getCurrentWindow, and .BrowserWindow.getAllWindows
I'm not including my code here because I'm not really looking for a a coding solution (unless that's the easy/best/only thing I should do and you can give me a solution from the information I've written) but more general advice on what direction I should go to solve this problem. I'm a good programmer in a language that is not Electron, or JavaScript, or NodeJS! So, with the right instruction I can get by, but please be easy on me. (For example I get lost in the instructions for #electron/remote around the API Reference section.) Thanks for any help you can provide.
Mike
Some big changes have been made to Electron over the past couple of years, especially with the use of remote. I would hate to say it but it looks like you are in for a bit of work to get it operational again.
You will want to look at ipcMain, ipcRender and contextBridge.
The inclusion of webPreferences: {preload: ""} in your new BrowserWindow() method plus the use of the above Electron methods will place you in a good starting position for safe, quick, thread seperated code.
See Context Isolation and Inter-Process Communication for more info.
PS: If you need a quick bit of code to get you going / give you an idea then let me know.

How do I customize the banner/header image of Hyrax/Samvera?

I'm a web developer, trying to get my bearings with the Samvera-based application known as Hyrax. I'm using version 2.1.0.rc3. I have done some devops-type stuff with Hyrax so far, I have an app running on AWS and can deploy new code to that stack via Capistrano... but I'm tired of looking at the default header image... time to move in... however, I'm stuck. I've tried searching for terms like image-masthead in the application code, but so far, no luck. I have a suspicion this is a frequently asked question, so I'd accept as an answer just a link to a howto. But... in my searching for an answer I have not yet found such a document. So, I'm turning to Stack Overflow. Help?
In your local application, search the config/initializers/hyrax.rb file for the string config.banner_image and try uncommenting it (and altering the URL to a custom image) and restart your rails server.

Images disappear on refresh in heroku-hosted rails application

Let me say first that I'm quite new and inexperienced with rails. Today I tried to update an image in a rails app hosted on Heroku. Anyway, this is the simple flow I followed as I did other times before:
Add updated image to the image folder
Precompile the assets rake assets:precompile
Add and commit all changes
Push to heroku
Until this point all seems fine: I open Chrome to check my app from my domain and it's all there as expected.
The problem is that if I refresh the page all the images disappear (like they have never been loaded). This does not happen locally.
If I do a ctrl+f5 it all comes back nicely, but I lose everything again on simple refresh.. and so on.
Has anyone experienced something similar? I understand this might be hard to answer as there is not much code to show. Let me know if I can give more details.
On a final note, it seems that all works normally on a friends machine (that is, refresh doesn't give this problem). I'm thinking something might be wrong with my Chrome settings here? I don't remember having changed anything recently though.
This is very weird and quite annoying some help/insights would be great.
UPDATE: This seems indeed really to happen locally on my machine at work. I checked from another couple of computers at home and the app is displayed fine (without any refreshing problem).
Did you check if the cookie is disabled by your browser for the heroku website in particular?
I have just tested this issue with an image based website (https://unsplash.com/). When the cookie is disabled for that website, pressing F5 clears all the images, while pressing Ctrl-F5 brings those lost resources back as like as your case.
Enabling cookie resolves the issue in my case.

SharpDX - AssetNotFoundException

Sorry to raise this question again as I see it has been asked a few times however the solutions have not helped me.
The code I am trying to get to work is one of the sample examples, desktop version of SpriteBatchAndFont https://github.com/sharpdx/SharpDX-Samples/tree/master/Toolkit/WindowsDesktop/SpriteBatchAndFont
My particular problem is that font Arial16.xml and the balls.dds image raise the AssetNotFoundException.
From previous posts I have noted and checked the set up of a relative directory for loading contents - Content.RootDirectory = "Content"; and checked that the font and the image are in that named dir. Further I have noted and checked that the Build Action is set to ToolkitFont and ToolkitTexture for the font and texture respectively.
I have also read that the project may need to be in the %Documents% folder (do not understand why that would be, but tested it anyway) and also that the Contents folder may not have the required Windows permissions.
It may well be something simple that I am not aware of but I have been at this for a few days and have now run out of ideas and googling ability. I would be grateful for any help or pointers. Thanks.
I wasted hours triying to figure it out, as all official examples and tutorials on web doesn't mention that.
Changing directory to Content.RootDirectory = #"\Content"; finally worked for me.

Why does my CSS go screwy "sometimes"

A website of mine is behaving weirdly. The layout sometimes is fine, and sometimes it is screwy. An example page that I see the problem on is this one: link
Disclaimer: I have yet to start my investigation into cause in earnest. I am turning to Stackoverflow because I am lazy and I hope someone will say "That happened to me once, it is probably this...". So please, no one get stuck into this working out this issue if it is something you have never seen before, as it wouldn't be fair as I have not done it myself.
Ok, some background:
The problem usually (maybe always) occurs when first viewing the page
The problem does not show up always, only sometimes
When the page shows up munged, if you refresh it usually reloads looking as it should
The site is a rails app
The css is passed through the neat Smurf Gem, which automatically minifies the CSS and Javascript on the page.
The layout problems happen in firefox (both linux and winXP)
The CSS is served up in the production environment using the ":cache => true" option which concatenates all the css files into one file
Anyway, I am hoping that this has happened to someone before and it will be really simple to fix. If not, I'll go and investigate and return with the solution (or a request for more help).
Thanks in advance!
James.
[edit]I added the first two bullet points, inspired by the comments and first answer[/edit]
We have had something similar when using HAML and SASS that resulted in the CSS being completely unavailable. It only happened on deploys. We determined it was a combination of the Rails stylesheet merging and the generation of the CSS from SASS. Sass was not done generating the CSS, which it did so on the first request to the application, when Rails attempted to merge it all together. The result, a corrupt useless CSS file. Then we stumbled upon this article which has a solution for preventing this issue.
Based on all this, my best guess is that the Smurf gem is attempting to generate your file on the first request, but Rails is serving it out before its done. The generation completes then each following request is fine. If this is the problem then the only solution i know of is to get the file generated before the first request. Of course, this does assume that it is related to deployments or application restarts in some way.
Peer
I had such a problem. The problem was only at the first time the page was loaded. Just reload it and it was fine.
The problem in my case was that the images where not there in the cache for the first time so the browser didnt know it's dimensions when preparing the page which caused the problem
If an image doesn't have a height/width assigned to it, a place is created on the page and it's put there. If the image doesn't quite fit, the browser may not know this until it's refreshed. Then it already knows the size and can properly fit it onto the page.

Resources