Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 930
    • Issues 930
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #1384

Closed
Open
Opened Nov 11, 2019 by spalmstrom@spalmstrom

JPATH_BASE calculated incorrectly in a system running under a virtual directory under Windows and Joomla

Overview

Please describe your problem or bug in detail.

Reproduction steps

CiviCRM is set up under Joomla using a virtual directory under an IIS based web site, e.g. https://example.com/subdir/

Current behaviour

Running say the cron job (cron.php) yields this error. :\Web root\libraries/vendor/autoload.php. CiviCRM does not record cron to have run.

Expected behaviour

What should happen.

This should be opened. :\Web root\subdir\libraries\vendor\autoload.php" CiviCRM should record cron to have run.

Environment information

  • Browser: _Edge
  • CiviCRM: _Release 5.19.1 (but seen in many earlier versions).
  • PHP: 7.2.24..._
  • CMS: Joomla 3.9.6/...
  • Database: MySQL 5.7.28...
  • Web Server: IIS under Windows 10...

Comments

_Replacing line 569 in /administrator/components/com_civicrm/civicrm/CRM/Utils/System/Joomla.php with define('JPATH_BASE', $joomlaBase . DS. 'administrator'); // to make sure we analyse correctly in the Windows environment seems to solve the problem. I plan to create a PR, but this just flags the issue as a placeholder. Maybe someone else is working on the same file, and in which case can pick it up.

The issue occurs because line 12 of /administrator/includes/defines.php uses the directory separator to explode JPATH_BASE into its component parts. If, therefore, the separator between subdirectory and administrator directories is not the directory separator, JPATH_BASE won't be analysed correctly.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
5.21.0
Milestone
5.21.0
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#1384