Regression in 2.2 version on drupal in sub-folder.

Created on 23 January 2025, 2 months ago

Problem/Motivation

When installing the latest version of the module on some portals (at least three), I find that by switching from version 2.1 to version 2.2, the sites no longer work correctly.
Specifically on drupal 10.4 the HP of the anonymous user no longer works correctly and the CSS is also redirected.

Steps to reproduce

To prove the problem is enough:

At the moment the only way to get sites working is to go back to version 2.1, which works fine whether the site is directly on a domain name or in a subfolder.

The same problem also occurs with Drupal 10.3 but for simplicity's sake I would perhaps check later.

๐Ÿ› Bug report
Status

Active

Version

2.2

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡นItaly uccio Turin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @uccio
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly uccio Turin

    After several tests (even creating a vhost), I came to the conclusion that there are two problems in version 2.2

    1) the module does not correctly handle paths containing the specified port e.g. http://test_anonymous_login.loc:820 (but works correctly for installation in the root directory on the default ports 80 and 443)

    2) if the site is hosted in a subdirectory, the css are not served correctly after cache destruction e.g. http://test_anonymous_login.loc/web or http://test_anonymous_login.loc:820/web.

    For problem 2 but no port I have a working fix, and for problem 1 I am working on it.

    Considering that under standar conditions http://test_anonymous_login.loc the module works as it should I am declaring gravity

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly uccio Turin

    I have created a first patch that works correctly if drupal is installed in a top-level sub folder (e.g. example/web)

    The patch completes the work done on base_paths by adding the base path to all include/exclude urls.
    Injecting the base path into the urls has the negative effect that the module now does not recognise the โ€˜front pageโ€™.

    If you could correct the identification of the front page when in sub directories, the work would be complete.

    patch: https://git.drupalcode.org/issue/anonymous_login-3501738/-/compare/8.x-2...

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly uccio Turin

    After carrying out several tests with the following configuration:

    *
    ~/*
    ~api/*
    ~user/login
    ~user/password
    ~user/register
    

    and having tested extensively:

    therefore the same installation both in the root and in the subfolder (I have changed the vhost configuration over time)

    The attached patch does not introduce problems for me but solves the ones I encountered.
    The patch aims to make the management of pats homogeneous both in the root and in the subfolder.
    To be conservative, I ran the tests on a non-standard 820 port to demonstrate all the possible configuration nuances.

    Hoping the patch might help.. I would ask for it to be tried.

  • Merge request !16Resolve #3501738 "Drupal on sub-folder " โ†’ (Open) created by uccio
  • Pipeline finished with Failed
    2 months ago
    Total: 149s
    #407145
  • Assigned to uccio
  • Status changed to Needs review 8 days ago
  • Patching the commits on the merge request works for me, thanks.

  • After testing I found that aliases were not quite working with subdirectory; pushed an additional commit to the MR that works for me.

  • Pipeline finished with Failed
    4 days ago
    Total: 169s
    #462576
Production build 0.71.5 2024