I should expect to see my custom.php (and children) rendering as they used to.
I see the component default view instead of my custom override view
cPanel Version 98.0 (build 11)
Apache Version 2.4.51
PHP Version 7.4.25
MySQL Version 5.7.36
Architecture x86_64
Operating System CentOS 7-9.2009.0.e17.centos.x86_64
I tried this twice on two installs. Maybe i'm missing something dumb, but it sure seems broken.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
I have already done a couple of J4 sites always with overrides which are working. Are you sure you uploaded the right files?
i copied the default.php and children, added some code (which works when i put it in the default.php override. But when i rename that file and the children, it does not work, i see the component default.php and children. if i rename the files back to default.php, the desired view renders.
i dunno why it would matter, but the mod is:
in default_children.php, in insert
<?php if ($this->items[$i]->created_by == JFactory::getUser()->id) : ?>
between lines 172 & 173, and then close the if before the endforeach, as one does. It renders the category with only the articles written by the current user while the file's named "default_children.php" but not when it (and its family) are named "anythingelse_children.php".
I could be missing something easy. But i've wrangled with this for a few hours. Thanks for y'all's time
So is it fixed for you? It's not clear for me if you still have a problem or not.
No, @HLeithner it doesn't work. The mod above only works when the override is named default_articles.php. It does not work for any custom.php and children... for me.
I'm sorry but I can't replicate the issue.
I copied default.php, default.xml, default_articles.php and default_children.php to xxx.php, xxx.xml, xxx_articles.php and xxx_children.php
Then I changed only the title in the xxx.xml to "xxx" and created a menu item with the "xxx" layout. Selected a category with multiple sub categories and checked the frontend. I can confirm that this works like excepted. The page is update from 3.10 to 4.0 to 4.1.
I think something is wrong with your path or file names.
To be honest - if you ask supporters in forum.joomla.org you will get better help.
But if you are convinced that it is a bug in Joomla: Please post a screen of your template/html/com_content folder with all files. As @HLeithner says - there must be an error in your structure.
i made another clean install and started from scratch. Apparently there was some kind of issue with the old install and naming/renaming/moving/etc. Thanks for all your time. I'll check again again and again before i post again.
FWIW, the old install still breaks if i only rename the files. no idea what i did to it.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-11-15 21:08:24 |
Closed_By | ⇒ | HLeithner |
So now it works? that's good I'm closing this.
I cannot replicate this, works for me without issue