Contao Backend Styling / layout missing - contao

Hi contao developer out there,
Anybody knows why the styling of the whole admin backend's missing.
I attach a screenshot, let me know if anyone knows something.
enter image description here

Looks like you have installled your Contao into a sub directory and setup your base url incorrect.
Have a look into system/config/pathconfig.php and verify the path is the same as in your browser (i.e. return ''; for an installation in the root dir and return '/some-dir'; for an installation in an subdir).
You should also check with web-developer tools as to which URLs for the Backend CSS it tries to load. Usually this already points out what in the base url is wrong.
Last thing, you might have set up some "strange" rewrite rules in your .htaccess file which may cause these problems.

Problem solved.
The fact that, the problem comes from the server configuration.
The Php process wasn't have enough permission, so it takes me some time to realise and knowing that I need to change the apache modul version to cgi/fpm mode.
This grants the php to recreate and generate the assets including js/css in asset folder. (at least from my own observation) and it works now.

Related

How do I deploy an Angular-Dart web app

After using FileZilla to ftp the files to the website, my app just shows
Loading....
...when trying to run from a chrome browser.
I have built and tested the app in Webstorm (2017.2.3)
Do I need to do anything else other than just copy the files from the build/web directory to my host? What about the build/lib directory?
If you want to see what is happening (or not, actually), take a look at:
http://sudoku.geobits.com/index.html
Thanks for your help.
The file main.dart.js fails to load because of a comment at line 32071:
// "Document", so we check for the xmlVersion property, which is the empty
This is clearly shown in the examples at: sudoku.geobits.com/index.html which loads correctly, compared iwth sudoku.geobits.com/with_comment/index.html which does not. The difference is that the first does not have the comment, whereas the second is the main.dart.js as generated by WebStorm.
I have logged a bug report:#30992 with the dart-sdk people.
Thanks to all for their kind help.

Why can't I view or edit Umbraco templates?

When I open the Umbraco (7.6.3) backoffice, I'm unable to view or make changes to templates. It seems like other functionality is unaffected, and I can create & edit specific pages. However, attempting to open the templates themselves just leads to a white screen. This problem exists across browsers:
Other screens render just fine:
What gives?
Checking the console when attempting to load gives an interesting error:
Error: Argument 'Umbraco.Editors.Templates.EditController' is not a function, got undefined...
Resolution:
The issue seemed to be caused by outdated files in the Umbraco folder. Copying most directories over from packages\UmbracoCms.7.6.3\UmbracoFiles\umbraco\ seems to have done the trick.
Looking at the changelog, it seems like the JS folder was the most influential in getting this fixed.
Are you sure that you're on 7.6.3? The UI appears to be pre-7.6 (I can tell because the colours haven't been updated).
If you have just upgraded, it's possible that your browser has cached the JS which is used - hard refresh your browser to see if the UI updates.
Umbraco also uses a dependency service to compile all of the used JS/CSS files together into one large one. This service will not be used if your website is in debug mode. Either:
Turn debug mode on in the Web.config
Delete any files in the \App_Data\ClientDependency\ folder as this is where the cached compiled files are kept (these will be regenerated)
My first thought would be file permissions.
Have you run the health check for permissions in the developer section? Need to make sure that your application pool user has write permissions on the Views folder.

Wordpress URL change

I have recently moved my wordpress site from "test.xxxxxx.com" to "xxxxxx.com" They are both identical except I just want to get rid of the "test" portion of my url on my index page and all my links. They are both on the same FTP and server. I transferred my site and have the homepage url working correctly but when I click on any of the links it still says "test" in front of the url. I have tried a couple different search and replace plugins with no luck. Is there a better way to go about this?
Wordpress has a problem that it doesn't update the permalinks easily. So, maybe you will have to change the permalinks manually in the wordpress database.
Use Better Search Replace plugin in order to fix old urls in your database.
After downloading and activating the plugin, you juste have to type old url to find and by which url to replace it, in your case you have to do it twice :
test.xxxxxx.com to xxxxxx.com
and
test.xxxxxx.com/ to xxxxxx.com/
I advice to do it twice because sometimes the plugin make difference between these two (strict string comparison I think) and wil not modifiy everything with only one command

IHttpModule not being applied to virtual directory

I have a network folder that is mapped to my iis app as a virtual directory and I'm trying to do some authentication for files that are located there with an ihttpmodule. I've verified that the ihttpmodule is firing properly for anything else in my app, just not the files located in virtual directory. Most of what I've found is that the directory can't be listed as an application (which it isn't), and everything should work. The other solution that I found was to add the the module tag to the tag, but that didn't seem to help either. Everything that I've found talks about stopping this from happening. So my question is what could be set that is causing this to not work? Is there a certain execute permission that needs to be set? Any other iis settings that could cause this? It is an mvc app, and this is how my directory structure is laid out:
server/app <- my application folder
server/app/content/downloads <- downloads is the virtual directory
Do I have to add the virtual directory directly under my app directory? Is that part of the problem? I don't have direct control of the server my code is running on, so testing things out is a bit of a pain... so I was looking for some more thoughts before starting to send emails off to my operations people. Thanks!
Well, I think I found what the issue is.... it looks like by default, iis6 does not pass executables, zip files, or anything of that nature through the .net runtime. It only does that with .aspx files and such, so it will never fire my ihttpmodule. It looks like you can force it to by adding a mapping for that extension, but is there a code work around for this? Or is that the only way?

How can I make a server log file available via my ASP.NET MVC website?

I have an ASP.NET MVC website that works in tandem with a Windows Service that processes file uploads. For easy maintenance of the site, I'd like the log file for the Windows Service to be accessible (to me, only) via the website, so that I can hit http://myserver/logs/myservice to view the contents of the log file. How can I do that?
At a guess, I could either have the service write its log file in a "Logs" folder at the top level of the site, or I could leave it where it is and set up a virtual directory to point to it. Which of these is better - or is there another, better way?
Wherever the file is stored, I can see that there's going to be another problem. I tried out the first option (Logs folder in my website), but when I try to access the file via HTTP I get an error:
The process cannot access the file 'foo' because it is being used by another process.
Now, I know from experience that my service keeps the file locked for writing while it's running, but that I can still open the file in Notepad to view the current contents. (I'm surprised that IIS insists on write access, if that's what's happening).
How can I get around that? Do I really have to write a handler to read the file and serve it to the browser myself? Or can I fix this with configuration or somesuch?
PS. I'm using IIS7 if that helps.
Unfortunately I'm afraid you'll have to write a handler that will open the file, and return it to the client.
I've written an IIS Manager extension that displays server log files, and what I've noticed that even the simple
System.IO.File.OpenRead("")
can still run in the same problem, and return the same error.. It was kind of confusing.
In the end I used
System.IO.File.Open("", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
and I could easily open the file while the server was writing logs to it :)
I think the virtual directory is an "okay" solution, if you add the directory (application) with READ ONLY rights + perhaps "BROWSE directory" too (so you can see the folder contents rendered by the IIS).
(But once you do that, you should consider that you also anonymous access to that folder - unless you enable authentication, so watch out for "secret" contents of the logfiles that you might expose? just a thought.)
Another approach, I prefer myself, is to make a MVC/ASP.NET page that does the lookup in the folder by normal code, so that you 100% can filter whatever data is shown in the HTML.
You can open the files as TextStream's and in Read Only mode.
If it's a problem to gain access to the logfolder, I would use the virtual directory with READ ONLY access and then program something that renders the logfiles as HTML on my screen and with my detail levels. Perhaps even add some sort of "login" first. But it all depends on your security levels and contents of logfiles.
is this meaningfull to you? if not, please explain more, as I've been through this thought a few times already for similar situations.

Resources