Layout messed up after 1.31.44 update

Forum for questions and support relating to the 1.31.x releases only.
maxiedaniels
Posts: 21
Joined: Sat Mar 10, 2018 1:34 am

Re: Layout messed up after 1.31.44 update

Post by maxiedaniels » Fri Jun 08, 2018 6:47 pm

Still no fix on this? I tried the fixes in the thread, no dice. I can't change any options on my monitors because the layout is completely screwed. ZMNinja also stopped working.

User avatar
zd59
Posts: 74
Joined: Wed Jan 18, 2017 1:39 pm
Location: EU - Slovenia

Re: Layout messed up after 1.31.44 update

Post by zd59 » Tue Jun 19, 2018 12:40 pm

Distribution: Slackware
ZM version: 1-31.44-GIT-20180618 at 7:30GMT+2

Zoneminder config file for Apache is configured as noted on previous posts here and also confirms to:
Grant access to the new cache directory in Apache on Ubuntu (#2130):https://github.com/ZoneMinder/zoneminde ... e40f4ae5ef

The web interface is a total mess. CSS skin is always the same regardless of settings. Non workable buttons e.t.c. .
Even Zoneminder log is empty.
ZM_log.jpg
ZM_log.jpg (17.62 KiB) Viewed 622 times
By accident I discovered "solution" - set Zoneminders cache folder inaccessible to Apache (root/root), and :D suddenly all web interface have a working nice new look!
ZM_new_look.jpg
ZM_new_look.jpg (62.75 KiB) Viewed 622 times
The downside of above cache folder setting are constant huge error logs.
ZM_GUI_Error_log.jpg
ZM_GUI_Error_log.jpg (149.16 KiB) Viewed 622 times
All menus work, so I do not understand what is the use of a cache folder?
One time I forget to delete files in that cache folder after chown root/root. On my surprise GUI did not worked. It worked again after files there were deleted.

Must confess, that this is very strange behavior.

TylerSchwend
Posts: 21
Joined: Sat Nov 05, 2011 11:03 pm

Re: Layout messed up after 1.31.44 update

Post by TylerSchwend » Thu Jun 21, 2018 2:33 am

Those of you who have issues even after making the suggested changes... Check the following...

If you hit F12 in Firefox, do you see 404 errors for all of the /cache/ URLs when you reload your page?

Then your config still isn't telling apache where the config folder is.

For me, I thought my config was all in apache2/conf-enabled/zoneminder.conf. But it turns out, that file was certainly there, it was just being over-ridden by my host specific file under apache2/sites-enabled/somesite.com. Make sure you don't hae ZM stuff in TWO config files in apache. The easiest way is to:

Code: Select all

grep zm /etc/apache2/* -R
(Note that even after fixing this, and getting my layout back, I have the issue with ZMDC/ZMC getting signal 15 over and over and over)

User avatar
zd59
Posts: 74
Joined: Wed Jan 18, 2017 1:39 pm
Location: EU - Slovenia

Re: Layout messed up after 1.31.44 update

Post by zd59 » Thu Jun 21, 2018 7:28 am

Slackware is simpler to configure, as it complies to standard Unix. There is only one config file regarding Zoneminder & Apache.
Then your config still isn't telling apache where the config folder is.
- if that was the case, there would be no difference in web look when changing cache folder ownership.

There is something bad in that cache files that ruin GUI.
At compile & package creation time at final stage I've got warnings regarding zero size files and empty folders in skins folders.
Thinking about false Slackware script and so looked at iconnor https://launchpad.net/~iconnor/+archiv ... +packages and grab a deb package (zoneminder_1.31.44~20180616225102-trusty_amd64).
On my surprise there are exact the same zero files and empty folders:
examples:
/usr/share/zoneminder/www/skins/classic/css/classic/views the file zone.css is a ZERO size
/usr/share/zoneminder/www/api/lib/Cake/Console/Templates/skel/Console/Templates - there is only one file named "empty", its size is also ZERO.

There are more than 20 empty folders in that package from I. Connor, the same one as in my Slackware package.
That looks no good for me, that must be a source of a web interface mess.

User avatar
zd59
Posts: 74
Joined: Wed Jan 18, 2017 1:39 pm
Location: EU - Slovenia

Re: Layout messed up after 1.31.44 update

Post by zd59 » Thu Jun 21, 2018 7:48 am

And would someone please explain, why the new web GUI works OK, when Apache do not have access to ZM cache folder, and do NOT work, when access is enabled?
Even worse, Apache do not have access to ZM cache folder (root/root), there are some old cache files, GUI is ruined. When this obsolete files are deleted, suddenly GUI works.

And when GUI works, log warnings are "Failed linking skins/classic/ .. ", when GUI do not work, even logs can not be observed.

User avatar
knight-of-ni
Posts: 2115
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Layout messed up after 1.31.44 update

Post by knight-of-ni » Mon Jun 25, 2018 3:55 pm

@zd59 your case is going to be different than most of the other users in this thread.
Essentially, what is going on here is the packaging scripts for each distro need to be updated to account for the new changes in zoneminder.

We take care of Ubuntu and Redhat, but other distros will require coordination with that distro's package manager.

Here is what the packaging scripts need to do:
- ZoneMinder uses a cache (busting) folder now. This folder path needs to be set at build time using -DCMAKE_CACHEDIR
- Packaging scripts need to ensure the new cache folder is owned by the web server account. The name of this account is different for every distro
- The apache config file that ships with the package has to be updated to incorporate the new features. A generic template can be found here: https://github.com/ZoneMinder/zoneminde ... he.conf.in

This generic template is just a starting point. It may have to be modified by the slackware package manager to work with that distro.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

User avatar
zd59
Posts: 74
Joined: Wed Jan 18, 2017 1:39 pm
Location: EU - Slovenia

Re: Layout messed up after 1.31.44 update

Post by zd59 » Thu Jun 28, 2018 7:59 am

Thank you knight-of-ni! :D :D

-DZM_CACHEDIR was the key.
Changes in Apache configuration I followed earlier. So WEB interface works now.
Are there any other changes related to upgrade from 1.31.1?
Here I think on build & configure scripts. I'm not a package maintainer for Slackware, but would like to test ZM from GIT - hardly waiting a working direct camera stream recording (pass-through). This will hugely reduce disk space use. So I would like to follow those configure & build changes.
Currently some functions do not work and I am not sure, if there are missing/wrong configurations, or it's "test feature".

Congratulate all developers for a really excellent package.

User avatar
knight-of-ni
Posts: 2115
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Layout messed up after 1.31.44 update

Post by knight-of-ni » Thu Jun 28, 2018 12:17 pm

zd59 wrote:
Thu Jun 28, 2018 7:59 am
Thank you knight-of-ni! :D :D

-DCMAKE_CACHEDIR was the key.
Changes in Apache configuration I followed earlier. So WEB interface works now.
Are there any other changes related to upgrade from 1.31.1?
Here I think on build & configure scripts. I'm not a package maintainer for Slackware, but would like to test ZM from GIT - hardly waiting a working direct camera stream recording (pass-through). This will hugely reduce disk space use. So I would like to follow those configure & build changes.
Currently some functions do not work and I am not sure, if there are missing/wrong configurations, or it's "test feature".

Congratulate all developers for a really excellent package.
Glad you like the changes, and unfortunately that does mean there will be common growing pains for every distro.
I have summarized the most significant changes here:
https://github.com/ZoneMinder/zoneminde ... -395094624
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

User avatar
zd59
Posts: 74
Joined: Wed Jan 18, 2017 1:39 pm
Location: EU - Slovenia

Re: Layout messed up after 1.31.44 update

Post by zd59 » Thu Jun 28, 2018 4:44 pm

Thank you again knight-of-ni!

You suggested a -DCMAKE_CACHEDIR in build script.
In a link above you stated:
Oh yes, lots of things will affect packagers.
There is now a web cache folder. You need to specify its location during build with the cmake flag -DZM_CACHEDIR
What of the above is needed, or both?

User avatar
knight-of-ni
Posts: 2115
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Layout messed up after 1.31.44 update

Post by knight-of-ni » Thu Jun 28, 2018 4:56 pm

ZM_CACHEDIR is the correct name of the cmake macro.

See:
https://github.com/ZoneMinder/zoneminde ... s.txt#L144
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

User avatar
zd59
Posts: 74
Joined: Wed Jan 18, 2017 1:39 pm
Location: EU - Slovenia

Re: Layout messed up after 1.31.44 update

Post by zd59 » Mon Jul 02, 2018 6:07 pm

Thank you again knight-of-ni.

Both variants work.
The new skins are really nice. The only complain from me is poor visibility of menus and status at lower contrast - high environment light on monitor.
See my last screenshot above - Grey and blue letters on black background.

muggi
Posts: 10
Joined: Sun Jun 24, 2018 4:19 pm

Re: Layout messed up after 1.31.44 update

Post by muggi » Sat Aug 11, 2018 3:20 pm

HI and sorry to ask this,
but where and how do i change the path to the cache.

Im using Zm 1.31.45 under:

Code: Select all

RELEASE=18.3
CODENAME=sylvia
EDITION="Cinnamon 64-bit"
DESCRIPTION="Linux Mint 18.3 Sylvia"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_sylvia_cinnamon_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_sylvia_cinnamon.php
USER_GUIDE_URL=help:linuxmint
GRUB_TITLE=Linux Mint 18.3 Cinnamon 64-bit
and I got the buttons and layout all screwed, so I can't do any thing.

A refresh of the Zm page under Firefox gives me these errors via the F12:

Code: Select all

Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_css_base_views_console-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_css_classic_views_console-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic__js_dateTimePicker_jquery-ui-timepicker-addon-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic__js_jquery-ui-1.12.1_jquery-ui.structure.min-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic__css_classic_jquery-ui-theme-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_js_classic-classic-1533760722.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_js_skin-classic-1533760722.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_views_js_console-classic-1533760722.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_js_classic-classic-1533760722.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_js_skin-classic-1533760722.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_views_js_console-classic-1533760722.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_css_base_skin-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_css_classic_skin-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_css_base_views_console-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic_css_classic_views_console-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic__js_dateTimePicker_jquery-ui-timepicker-addon-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic__js_jquery-ui-1.12.1_jquery-ui.structure.min-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
skins_classic__css_classic_jquery-ui-theme-classic-1533760722.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
?view=console:155 Uncaught ReferenceError: addMonitor is not defined
    at HTMLButtonElement.onclick (?view=console:155)
here is the path in one of the above errors:

Code: Select all

http://localhost/zm/cache/skins_classic_css_base_skin-classic-1533760722.css
I'm via the filemanager locating a file of above name , under the path:

Code: Select all

/var/cache/zoneminder/cache/skins_classic_css_base_skin-classic-1533760722.css
Can I somehow correct/set the path in:
/etc/apache2/conf-available/zoneminder.conf

or some other file , and how ?

*EDIT start*
I added my zoneminder.conf file content from /etc/apache2/conf-available/ :

Code: Select all

<Directory "/var/cache/zoneminder/cache">
Options -Indexes +FollowSymLinks
AllowOverride None
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>

ScriptAlias /zm/cgi-bin/ /usr/lib/zoneminder/cgi-bin/
ScriptAlias /cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>


Alias /zm "/usr/share/zoneminder/www"
<Directory "/usr/share/zoneminder/www">
Options -Indexes +FollowSymLinks
AllowOverride All
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>
Do I need a path alias for the http://localhost/zm/cache/ path ?

*EDIT Stop*

Sorry I read this thread, but dint not figure it out ?

User avatar
zd59
Posts: 74
Joined: Wed Jan 18, 2017 1:39 pm
Location: EU - Slovenia

Re: Layout messed up after 1.31.44 update

Post by zd59 » Sat Aug 11, 2018 5:39 pm

Hi muggi!

Find the Apache config file consisting the following line near beginning:

Code: Select all

<VirtualHost *:80>
Then follow this https://github.com/ZoneMinder/zoneminde ... he.conf.in
Note the line 12, and add lines 13 - 26 to this file! After saving file, restart Apache.

The path in

Code: Select all

Alias /zm/cache "@ZM_CACHEDIR@"
is adjustable to your configuration. Find the real place and use this.
In my case, it once worked absolute/full path "/var/zm/cache", next git release (after few days) worked "/zm/cache".
And take attention to permissions of this folder. Apache user & group must have RW permissions there.

muggi
Posts: 10
Joined: Sun Jun 24, 2018 4:19 pm

Re: Layout messed up after 1.31.44 update

Post by muggi » Mon Aug 13, 2018 8:36 pm

thank you very much for the fast reply.
I tried it out yesterday, but seem like I can not get it to work.
I think some of my installs of the apache / zm / mysql went FUBAR:

I can not find a apache file containing
<VirtualHost *:80>

I tried change the lines you mentioned in zoneminder.conf under
/etc/apache2/conf-available
I also added the
<VirtualHost *:80>
ServerAdmin webmaster@localhost
Gives me an error the added line , when trying to restart apache service:
Aug 13 22:26:06 ThinkCentre-M91p apache2[8193]: apache2: Syntax error on line 224 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/conf-enabled/zoneminder.conf: /etc/apache2/conf-enabled/zone
Aug 13 22:26:06 ThinkCentre-M91p apache2[8193]: Action 'configtest' failed.
so i added a # to the first 2 lines:

also when active without the #, I do not know if i need to change the
ServerAdmin webmaster@localhost
to my setup ?


(i also tried to change the Alias line to "/var/zm/cache"
this is zoneminder.conf :

Code: Select all

#<VirtualHost *:80>
#ServerAdmin webmaster@localhost

# Order matters. This alias must come first.
    #Alias /var/cache/zoneminder/cache "@ZM_CACHEDIR@"
    #Alias /var/zm/cache "@ZM_CACHEDIR@"
     Alias /zoneminder/cache "@ZM_CACHEDIR@"
    <Directory "@ZM_CACHEDIR@">
        Options -Indexes +FollowSymLinks
        AllowOverride None
        <IfModule mod_authz_core.c>
           # Apache 2.4
           Require all granted
        </IfModule>
        <IfModule !mod_authz_core.c>
            # Apache 2.2
            Order deny,allow
            Allow from all
        </IfModule>
    </Directory>

ScriptAlias /zm/cgi-bin/ /usr/lib/zoneminder/cgi-bin/
ScriptAlias /cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>


Alias /zm "/usr/share/zoneminder/www"
<Directory "/usr/share/zoneminder/www">
Options -Indexes +FollowSymLinks
AllowOverride All
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>
Owner of the /var/cache/zoneminder/cache folder is
www-data
and I made a

Code: Select all

sudo chmod 777 -R /var/cache/zoneminder
to give full access to the folder

I do not have a /var/zm/cache folder.
I do not have a ZM folder under /var
the closest I have is thes files under
/var/cache/zoneminder:

Code: Select all

/var/cache/zoneminder/cache
/var/cache/zoneminder/events
/var/cache/zoneminder/images
/var/cache/zoneminder/temp
For your information:
under /etc/apache2/conf.d I have a link called zoneminder.conf that points to /etc/zm/apache.conf
but /etc/zm/apache.conf do not exist

I only have under /etc/zm/conf.d these files:
/etc/zm/conf.d/01-system-paths.conf
/etc/zm/conf.d/02-multiserver.conf
/etc/zm/conf.d/README
/etc/zm/conf.d/zmcustom.conf

zmcustom.conf looks like this:

Code: Select all

# These values were autogenerated by zmupdate.pl
# You may edit these values. ZoneMinder will not overwrite them.
#

ZM_PATH_ZMS=/cgi-bin/nph-zms
sorry if this is very confusing

muggi
Posts: 10
Joined: Sun Jun 24, 2018 4:19 pm

Re: Layout messed up after 1.31.44 update

Post by muggi » Mon Aug 13, 2018 8:48 pm

I can also add that changing the url from http//:localhost/zm to the ip of the localhost pc do not change anything:

GET http://192.168.10.56/zm/cache/skins_cla ... 760722.css 404 (Not Found)
192.168.10.56/:14 GET http://192.168.10.56/zm/cache/skins_cla ... 760722.css 404 (Not Found)
192.168.10.56/:16
ect...

EDIT
above 404 error i think is because the alias in this example i wrong.

See below in other post, a 403 error with Alias /zm/cache "@ZM_CACHEDIR@"
as the right path , but permission error
Last edited by muggi on Mon Aug 13, 2018 9:12 pm, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests