Skip to content

A bug which is present for a long time! #119

@01Kuzma

Description

@01Kuzma

This bug lives in a helix for a long time!
Version 3.0.3, but it seems, that it doesn't matter.
plugins/system/helix3/core/helix3.php

	public static function bodyClass($class = '')
	{
		$app       = Factory::getApplication();
		$doc       = Factory::getDocument();
		$language  = $doc->language;
		$direction = $doc->direction;
		$option    = str_replace('_', '-', $app->input->getCmd('option', ''));
		$view      = $app->input->getCmd('view', '');
		$layout    = $app->input->getCmd('layout', '');
		$task      = $app->input->getCmd('task', '');
		$itemid    = $app->input->getCmd('Itemid', '');
		$menu      = $app->getMenu()->getActive();
		if ($menu) {
			$pageclass = $menu->getParams()->get('pageclass_sfx');
		}

		if ($view == 'modules')
		{
			$layout = 'edit';
		}

		return 'site ' . $option
		. ' view-' . $view
		. ($layout ? ' layout-' . $layout : ' no-layout')
		. ($task ? ' task-' . $task : ' no-task')
		. ($itemid ? ' itemid-' . $itemid : '')
		. ($language ? ' ' . $language : '');
	}

This piece of code $option = str_replace('_', '-', $app->input->getCmd('option', '')); breaks a layout of any component which displays its class in the body. It changes a third-party component's underscore symbol (if it's used) to dash!
For what??? Developers are open to use such a naming convention in their own components.
Then the CSS styles or JS dependent plugins don't work.

For instance, Phoca Gallery uses a com_phocagallery class name in the body, it's changed to com-phocagallery!!

FIX it ASAP

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions