joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.77k stars 3.65k forks source link

[4.0] com_content backwards compatibility #25939

Closed angieradtke closed 2 years ago

angieradtke commented 5 years ago

Steps to reproduce the issue

I do not know exactly if it was a conscious decision behind it or the consequences were not thought of. All Blog / Featured views are missing the columns parameter. It was replaced in favor of the blog-class to solve the multiple columns in the future via CSS grids. This leads to the fact that many old templates will not work anymore and the error message devision by zero is fired, because the parameter no longer exists. I'm not sure if this is a good decision.

Expected result

Actual result

System information (as much as possible)

Additional comments

brianteeman commented 5 years ago

I agree

Note there is an open issue already for this iirc

ghazal commented 5 years ago

Glad someone pointed this out. I do agree too.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25939.

mbabker commented 5 years ago

Those types of parameters are best left at the template level and templates should work out how to integrate those into the various edit forms. Problem is the amount of complexity that adds to extensions and Joomla's terrible handling of forms in general makes that really painful to pull off, so you're stuck with core having to provide a set of options that are used to build HTML, and that's not good either IMO (there is way too much PHP in the layouts, which inherently means way too many conditional behaviors and a lot of overly complex files, see the 3.x version of the com_contact layouts as an example of this over-complexity).

I dare say Joomla needs to be majorly re-engineered because it is too difficult to enhance components with extensions and there is way too much logic in the layout code that should never leak that far down.

angieradtke commented 5 years ago

Hello, Michael,

basically I agree with you, but having this parameter has massive effects on the presentation in the frontend. Lots of pages don't work anymore. This is less of a problem for developers, but end users have to bear the costs.

The user (not the developer) usually finds it difficult to make changes, especially when learned processes are no longer feasible as usual. The new backend certainly poses challenges for the ordinary user, so we shouldn't discourage them with templates that no longer work.

Scrabble96 commented 5 years ago

I am redeveloping a Joomla 3/Bootstrap 4 template, which is constructed using simple container-fluid, rows and cols, alongside the new Joomla 4 development. I have come up with a css solution for non-grid-based blogs, although I'm still working on the left-right-top-bottom-alternate image alignment part:

.blog-columns-2 .blog-item { vertical-align: top; width: calc(50% - 10px); display: inline-block; margin-right: 7.5px; margin-left: 0; }

.blog-columns-2 .blog-item:nth-child(2n) { margin-right: 0; margin-left: 7.5px; }

.blog-columns-3 .items-leading { padding: 0 15px; }

.blog-columns-3 .blog-item{ width: calc(33.3333% - 13px); }

.blog-columns-4 .blog-item{ width: calc(25% - 15px); }

.blog-columns-3 .blog-item, .blog-columns-4 .blog-item { vertical-align: top; display: inline-block; margin-right: 7.5px; margin-left: 7.5px; }

.blog-columns-3 .blog-item:first-child, .blog-columns-4 .blog-item:first-child { margin-right: 7.5px; margin-left: 0; }

.blog-columns-3 .blog-item:nth-child(3n+1), .blog-columns-4 .blog-item:nth-child(4n+1) { margin-right: 7.5px; margin-left: 0; }

.blog-columns-3 .blog-item:nth-child(3n), .blog-columns-4 .blog-item:nth-child(4n) { margin-right: 0; margin-left: 7.5px; }

.blog-masonry-2-cols { column-count: 3; }

.blog-masonry-3-cols { column-count: 3; }

.blog-masonry-4-cols { column-count: 4; }

.blog-item { margin-bottom: 15px; }

So, instead of using, say, Cassiopeia's columns-2 in the menu item blog layout tab, use blog-columns-2 I hope this helps.

angieradtke commented 5 years ago

What if a template is using joomla 3xxx tempate overrides? It isn‘t a css problem . It is a problem of a non existing var.

Greeting Angie

brianteeman commented 2 years ago

I guess nothing is going to happen here now and this should be closed. Not my call though

joomdonation commented 2 years ago

Agree with @brianteeman. Closing this issue.

angieradtke commented 2 years ago

This issue is already solved .-)