Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After install settings referring to wrong CSS/JS #18

Open
icyground opened this issue Dec 2, 2020 · 0 comments
Open

After install settings referring to wrong CSS/JS #18

icyground opened this issue Dec 2, 2020 · 0 comments

Comments

@icyground
Copy link

Hello,
I installed wpkg-express-2 according to documentation and the install went quite well. Unfortunately heading to the settings page for creating a local user after installation fails - the site requests non existing css/js and saving the settings does not work.

CakeTheme.main.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.main-i18n-en.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.main-plugins.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.tree.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.flagstrap.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.tree.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.flagstrap.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.main-layout.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.libs.js:1 Uncaught SyntaxError: Unexpected token '<'
CakeTheme.main.js:1 Uncaught SyntaxError: Unexpected token '<'
CakeTheme.main-min.js:9 Uncaught ReferenceError: jQuery is not defined
    at Object.<anonymous> (CakeTheme.main-min.js:9)
    at t (CakeTheme.main-min.js:9)
    at CakeTheme.main-min.js:9
    at Object.<anonymous> (CakeTheme.main-min.js:9)
    at t (CakeTheme.main-min.js:9)
    at CakeTheme.main-min.js:9
    at Object.<anonymous> (CakeTheme.main-min.js:9)
    at t (CakeTheme.main-min.js:9)
    at Object.<anonymous> (CakeTheme.main-min.js:9)
    at t (CakeTheme.main-min.js:9)
CakeTheme.main-i18n-en.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.tree.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.main-plugins.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.flagstrap.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.main-plugins.js:1 Uncaught SyntaxError: Unexpected token '<'
CakeTheme.tree.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.flagstrap.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
add.min.js?v=5f677a9a:1 Uncaught ReferenceError: jQuery is not defined
    at add.min.js?v=5f677a9a:1
add.min.js?v=5f677a9a:1 Uncaught ReferenceError: jQuery is not defined
    at add.min.js?v=5f677a9a:1
view.min.js?v=5f677a9a:1 Uncaught ReferenceError: jQuery is not defined
    at view.min.js?v=5f677a9a:1
add.min.js?v=5f677a9a:1 Uncaught ReferenceError: jQuery is not defined
    at add.min.js?v=5f677a9a:1
add.min.js?v=5f677a9a:1 Uncaught ReferenceError: jQuery is not defined
    at add.min.js?v=5f677a9a:1
view.min.js?v=5f677a9a:1 Uncaught ReferenceError: jQuery is not defined
    at view.min.js?v=5f677a9a:1
add.min.js?v=5f677a9a:1 Uncaught ReferenceError: jQuery is not defined
    at add.min.js?v=5f677a9a:1
CakeTheme.main-layout.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.main.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.main-plugins.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.tree.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
CakeTheme.flagstrap.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)`

The front page instead works flawless and is referencing to the correct css/js cake_theme/cache_(css|js)/*.v1552635653.(js|css)

Rewrite module is enabled

 apachectl -M
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php7_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 status_module (shared)

Any direction, what went wrong with my installation?

Additional note, I patched the code a bit, to support anonymous LDAP binding, but this should not interfere and works well with the installer:

diff --git a/Plugin/Datasources/Model/Datasource/LdapSource.php b/Plugin/Datasources/Model/Datasource/LdapSource.php
index 9210b65..aef19e9 100644
--- a/Plugin/Datasources/Model/Datasource/LdapSource.php
+++ b/Plugin/Datasources/Model/Datasource/LdapSource.php
@@ -248,7 +248,6 @@ class LdapSource extends DataSource {

                //Set our protocol version usually version 3
                ldap_set_option($this->database, LDAP_OPT_PROTOCOL_VERSION, $config['version']);
-                ldap_set_option($this->database, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);


                if ($config['tls']) {
@@ -260,12 +259,7 @@ class LdapSource extends DataSource {
                //So little known fact, if your php-ldap lib is built against openldap like pretty much every linux
                //distro out their like redhat, suse etc. The connect doesn't acutally happen when you call ldap_connect
                //it happens when you call ldap_bind.  So if you are using failover then you have to test here also.
-
-               if ($bindDN == "anonymous") {
-                       $bindResult = @ldap_bind($this->database);
-               } else {
-                       $bindResult = @ldap_bind($this->database, $bindDN, $bindPasswd); // @codingStandardsIgnoreLine
-               }
+               $bindResult = @ldap_bind($this->database, $bindDN, $bindPasswd); // @codingStandardsIgnoreLine
                if (!$bindResult) {
                        if (ldap_errno($this->database) == 49) {
                                $this->log("Auth failed for '$bindDN'!", 'ldap.error');
diff --git a/Plugin/Datasources/Test/Case/Model/Datasource/LdapSourceTest.php b/Plugin/Datasources/Test/Case/Model/Datasource/LdapSourceTest.php
index b233e37..c89e1eb 100644
--- a/Plugin/Datasources/Test/Case/Model/Datasource/LdapSourceTest.php
+++ b/Plugin/Datasources/Test/Case/Model/Datasource/LdapSourceTest.php
@@ -79,15 +79,8 @@ class LdapSourceTest extends CakeTestCase {
                $ldap = ldap_connect($config['host'], $config['port']);

                ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, $config['version']);
-               ldap_set_option($this->database, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);

-               if ($config['login'] == 'anonymous') {
-                       $bindResult = @ldap_bind($ldap);
-               } else {
-                       $bindResult = @ldap_bind($ldap, $config['login'], $config['password']);
-               }
-
-               if (!$bindResult) {
+               if (!ldap_bind($ldap, $config['login'], $config['password'])) {
                        $this->markTestSkipped('Could not connect to LDAP server. Skip test.');
                }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant