?
avatar mino182
mino182
18 Jan 2019

Steps to reproduce the issue

Make custom module with content (copy of mod_custom)

Expected result

visible content editor.

Actual result

No content editor

System information (as much as possible)

In file:
components/com_config/view/modules/tmpl/default.php

on line 18 is variable $hasContent which is dependent on module name. Module which has other name than custom, mod_custom doesn't get content form because of condition on line 182 of same file.

Additional comments

Is it possible to make other decision algorithm for show content form? Thanks

avatar mino182 mino182 - open - 18 Jan 2019
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Jan 2019
avatar Ninja-007
Ninja-007 - comment - 19 Jan 2019

Joomla version?

avatar mino182
mino182 - comment - 19 Jan 2019

3.9.2

avatar Ninja-007
Ninja-007 - comment - 19 Jan 2019

I am not able to reproduce the issue on the build, although module name is different as you have described.

custom-module-on-new
custom-module-on-save-reopen

avatar mino182
mino182 - comment - 19 Jan 2019

Thanks for trying to help, yes in backend it works, my issue is in front end (as in name of issue). And for clarification I mean create new module like "mod_something", no another instance of mod_custom via module manager.

avatar infograf768
infograf768 - comment - 19 Jan 2019

Could you add here a zip of your new module? I may have an idea but first need to check your code.

avatar mino182
mino182 - comment - 19 Jan 2019
avatar infograf768
infograf768 - comment - 20 Jan 2019

Would you use this module only for your needs or do you want to distribute it?

avatar mino182
mino182 - comment - 20 Jan 2019

Only for my needs...

avatar infograf768
infograf768 - comment - 20 Jan 2019

In that case, it is very easy.
For now, create an override in the html folder of your template.
screen shot 2019-01-20 at 10 40 21
default.php is a copy of /components/com_config/view/modules/tmpl/default.php

In that file, modify line 18
from
$hasContent = empty($this->item['module']) || $this->item['module'] === 'custom' || $this->item['module'] === 'mod_custom';
to
$hasContent = empty($this->item['module']) || $this->item['module'] === 'custom' || $this->item['module'] === 'mod_custom' || $this->item['module'] === 'mod_customadv';

And that will work.
It does not solve the issue globally for any module of that type without this override, but I am still looking into this.

avatar mino182
mino182 - comment - 20 Jan 2019

Thanks, I actually use this sollution, but if there will be some upgrade in com_config, I will not get it, or I will need to check changes on every update... So this is reason why I open issue, that maybe someone come with better sollution for module type check...

avatar infograf768
infograf768 - comment - 20 Jan 2019

Can you try to replace /components/com_config/view/modules/tmpl/default.php
by this file
default.php.zip

avatar mino182
mino182 - comment - 20 Jan 2019

It works. Thanks. Will it be in next release?

avatar infograf768
infograf768 - comment - 20 Jan 2019

I will propose a PR for it and, after being tested, maintainers will decide if/when it is included.

avatar infograf768
infograf768 - comment - 20 Jan 2019

Please test #23604
Closing Issue as we have a patch.

avatar infograf768 infograf768 - close - 20 Jan 2019
avatar infograf768 infograf768 - change - 20 Jan 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-01-20 17:53:04
Closed_By infograf768
avatar infograf768
infograf768 - comment - 22 Jan 2019

Add a Comment

Login with GitHub to post a comment