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

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

Open
01Kuzma opened this issue Jan 22, 2023 · 0 comments
Open

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

01Kuzma opened this issue Jan 22, 2023 · 0 comments

Comments

@01Kuzma
Copy link

01Kuzma commented Jan 22, 2023

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

@01Kuzma 01Kuzma changed the title A bug which is present for a many years! A bug which is present for a long time! Jan 22, 2023
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