9 / 35
Oct 2022

Actually it’s giving the same two issues as first time with
Uncaught TypeError: window.egw_ready is undefined
and egw.min.js

api/js/jsapi/egw.min.js gibt es nicht und soll es auch nicht geben. Schau mal in Deiner Document Root ob das File evtl. bei Dir vorhanden aber nicht lesbar ist, dann lösche es einfach.

Die Datei die es gibt heißt api/js/jsapi.min.js und die ist auch in dem aktuellen (.bz2) Archive enthalten, habe es gerade nochmal runter geladen und entpackt.

Warum verwendest Du nicht die Standard Installation, die hat mehr Features (z.B. Push) und ist einfacher zu handhaben?

Ralf

There is no file in the js directory by that name. However I found references in the code for that file and also I noticed there’s no jsapi.min.js it’s only jsapi.js.

Framework.php file

// load our clientside entrypoint egw.min.js with a cache-buster
		$java_script .= '<script type="module" src="'.$GLOBALS['egw_info']['server']['webserver_url'].
			'/api/js/jsapi/egw.min.js?'.filemtime(EGW_SERVER_ROOT.'/api/js/jsapi/egw.min.js').
			'" id="egw_script_id"';

/**
	 * Constructor for static variables
	 */
	public static function init_static()
	{
		self::$js_include_mgr = new Framework\IncludeMgr(array(
			// We need LABjs, but putting it through Framework\IncludeMgr causes it to re-load itself
			//'/api/js/labjs/LAB.src.js',

			// always load jquery (not -ui) first
			'/vendor/bower-asset/jquery/dist/jquery.js',
			// always include javascript helper functions
			'/api/js/jsapi.min.js',
			'/api/js/jsapi/egw.min.js',
		));
	}

Bundle.php

foreach($js_includes as $file)
		{
			if (in_array($file, ['/api/js/jsapi/egw.js','/api/js/jsapi/egw.min.js'])) continue;	// loaded via own tag, and we must not load it twice!

I did not find jsapi.min.js, there’s only jsapi.js. Also egw.min.js is non existant in the directory.

How complicated will it be to change the installation to docker

Not complicated. If the conditions fit.

For you, because you don’t have a package installation:

Installation on a suitable system
Example:

Copy files (including backup) to new system
Read also:

Import backup
Ready


Please read also:

Stefan

even on docker test setup these issues are happening. Please advice

9 days later

No, does not happen for me.

It must be something in your environment.

Hundreds of installations using the docker container, and you are the only one reporting that problem.

Sorry :frowning:

Ralf

okay yeah I understand about docker installation
I have always updated to the latest version by archive installation and this is the first time I received these issues regarding js files on my non docker environment.
It was from the october version, any ideas to get rid of these will be appreciated.
Also will there be any other maintenance release version soon ?

Hi Ralf @RalfBecker

These two issues only came up after the latest update of egroupware and I’m stuck because we need to get the php 8.1 upgrade going.

I understand I might be the only one getting these issues but I have always been updated to the latest version with my archive installation but never got stalled like this before.

If there’s anything you can suggest that would be great.

One question, will now the latest version work with Composer 2 ?
I have been using Composer 1, should I upgrade for the archive installation

Yes, we are supporting the current Compose 2.x since a while now.

You can do a composer installation, that is what we do to create the container and it’s relativ easy to upgrade. It’s described in the Readme3.

Ralf

I have been upgrading egroupware with composer
composer create-project --prefer-source --keep-vcs egroupware/egroupware.

Is this still a valid way because I did it again and it’s giving me older version.

Creating a "egroupware/egroupware" project at "./egroupware"
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Installing egroupware/egroupware (20.1.20210503)
  - Installing egroupware/egroupware (20.1.20210503): Cloning fdaa1d1bcd from cache

Maybe that’s caused by your Composer 1.x, I would try it with an up-to-date Composer, for our container-build we always use the newest version:

Alternativ you can clone the EGroupware main repo and use our install-cli.php script to get the other depending repos. But you need Composer and npm with grunt-cli installed!

Ralf

okay updated composer and ran this command
composer create-project --prefer-source --keep-vcs egroupware/egroupware

It gives this error

[InvalidArgumentException]
Could not find package egroupware/egroupware. with stability stable.

here’s what I did like you suggested

  1. clone the EGroupware main repo and use our install-cli.php script to upgrade to latest version
  2. it was installed successfully, cleared cache in setup and tried to login, same error as below,
egroupware/api/js/jsapi/egw.min.js?
[HTTP/1.1 404 Not Found 0ms]

Loading module from “egroupware/api/js/jsapi/egw.min.js?” was blocked because of a disallowed MIME type (“text/html”)

I found the file that contains reference to this script, Framework.php

// load our clientside entrypoint egw.min.js with a cache-buster
		$java_script .= '<script type="module" src="'.$GLOBALS['egw_info']['server']['webserver_url'].
			'/api/js/jsapi/egw.min.js?'.filemtime(EGW_SERVER_ROOT.'/api/js/jsapi/egw.min.js').
			'" id="egw_script_id"';

I replaced the file here with jsapi.js and it gives me jquery undefined after.

Despite cloning the repo as it is, it’s giving me the same issue as in the beginning.

Have you installed npm and grunt-cli, as I asked, so install-cli.php finds them and creates the minified JavaScript Files?

Ralf

yes, npm and grunt cli was installed and it installed all the dependencies.
I now see jdots and node_modules folder in egroupware directory. Composer is also updated to 2.0

Where are the minified files supposed to be located ?
I don’t see any minified files in in the jsapi folder