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

Astroid 2.6.3 and Template One 2.6.3: styles are not correctly recognised #262

Closed
fontanil opened this issue Dec 12, 2022 · 36 comments · Fixed by #261
Closed

Astroid 2.6.3 and Template One 2.6.3: styles are not correctly recognised #262

fontanil opened this issue Dec 12, 2022 · 36 comments · Fixed by #261
Labels
Admin Keys Asked bug Something isn't working SOLVED!

Comments

@fontanil
Copy link

Hi,

For several monthes I'm using two styles (not child template) of Astroid One. One style as default with blue background color, no image, the other for the home only with a background picture and a transparent background color for ".astroid-layout.astroid-layout-boxed .astroid-wrapper".

Using Astroid 2.6.2 (and One 2.6.3), all work well: changing the page use the right style, picture on the home page, background color for the other pages.
If I update Astroid Framework to 2.6.3, the styles are not the right ones, all page are sometimes using the home style, sometimes the default one. If I reinstall the Framework 2.6.2, everithing is working welle again.

Is it a bug in Astroid 2.6.3, or how could I do?

Regards,
Robert

@Chacapamac
Copy link
Collaborator

Maybe a problem of cache????
— Be sure that you manually take out any compiled css in the JoomlaRoot/templates/astroid_template_one/css folder e.g.“compiled-a0219c0b4fffa504bb047dcdfe7aeaea.css”
Because, when you update the template to 2.6.0+ all the compiled css are now compiled in the JoomlaRoot/media/templates/site/astroid_template_one/css folder

— Empty your Astroid and Joomla cache
— Empty your Browser cache and try again

I’m using Zero and I update few websites with multiple layout without problems.

Also, maybe recheck your Astroid Template Manager Layout Style Menu Assignment, if everything is correct in there?

@fontanil
Copy link
Author

fontanil commented Dec 18, 2022

Sorry, no cache problem.
I have two styles, one as default, one for the home page. Each have it's own custom.css ("custom.css" as default, "customa.css" for the home)
With Astroid 2.6.2, the two styles are well used.
I update to 2.6.3 and the style for the home page is used on the other pages if I clear the caches and opent the home first.
I open a page (not the home) and clear the caches (Astroid and Joomla!): the style is the good one. Then I open the home page and the style is not the one for this page.
The first custom file is not replaced by the other in the version 2.6.3

These files were placed for a while in templates/astroid_template_one/css folder. I emptied all caches and I moved the files in /media/templates/site/astroid_template_one/css, templates/astroid_template_one/css is totally empty, but no changes!

Verified on the production site and on a local copy (Joomla 4.2.6, PHP 8.1)

@Chacapamac
Copy link
Collaborator

I think that maybe the customa.css is not loading when place in the media folder

A question, how do you assign a specific custom CSS file to both “Default” and “Home” style?
I guess you using the Layout Style —> Template manager —> Custom CSS Files

— Check by your browser inspector {normally the “Network” function) if customa.css is loaded
— What happen if you move back both custom CSS to the normal template folder
— However you are loading the specific CSS file for “Default” and “Home”, try to inverse the name of the custom CSS file to see what happen
customa.css for the “Default” style
custom.css for the “Home” style
My guess will be that your Home will now work correctly, but not your Default pages

@Giorgi625
Copy link

I had simillar problem, Home style worked fine, but default could not load my settings and in my situation it was caused by Advanced Template Manager by regular labs. As its developer told me it is not compatible with some 3rd party template frameworks like Astroid. When I disabled that plugin template worked fine.

@fontanil
Copy link
Author

I don't use this extension.
I remind you that I have no problem with Astroid Template One 2.6.3 and Astroid Framework 2.6.2
On a local site I tried many combinations without result. I tried to create a child template to separate the files, the problem remains the same.
It's the only website where I'm using two styles from the same Astroid template.

@sonvnn
Copy link
Member

sonvnn commented Dec 20, 2022

Hello @fontanil @Giorgi625

May you send me your admin account and detail issue via sonlv@templaza.com? I will help you check it.

Best Regards,
Sonny

@fontanil
Copy link
Author

Thanks Sonny but I can't send you these data because it's a production client's site and the test site is on my own local server.

@Giorgi625
Copy link

@sonvnn Sent details to your email. you can enable minify css in Home template style, to see problem.

@fontanil
Copy link
Author

Hi,

I just tried a new test. 2 styles of Astroid One Template, one as default, one for the home page. No custom CSS files, only some custom css code in the template style of the home page.

.astroid-framework {
background-image:url(/images/my_picture.jpg);
}
.astroid-layout.astroid-layout-boxed .astroid-wrapper {
background-color:transparent;
box-shadow: none;
}
All caches were cleared, but no change, the custom css code is used on all the pages if I open first the home page, the "no custom css style" is used on all the pages if I open another page first.

@Chacapamac
Copy link
Collaborator

I just test on my live Astroid Testing Website. —> http://joom4-astro.graf-test.ca/

• I got 2 Layout styles, one is assigned to the “Home” page and a “Default” style for the all other pages

home -style

• I add the custom css directly in the Layout Style for my “Home page
#astroid-header { background-color: beige;}
Making the background of the sidebar beige only on the home page

Check, you will see that it work without problems
—> background of the sidebar beige only on the home page (Home Style)
—> background of the sidebar transparent on all other pages (Default Style)

astroid

Can you upload a copy of your website that we can go in without problems, it will be easier for helping...

@Chacapamac Chacapamac added Admin Keys Asked bug Something isn't working and removed bug Something isn't working Admin Keys Asked labels Jan 2, 2023
@Chacapamac
Copy link
Collaborator

Hello @fontanil
I just try again and it work I can insert custom code in one layout that doesn't affect the others layouts
Look at the beige background on the Header & Right Column, only in the “Home” page Layout here —> http://joom4-astro.graf-test.ca/

You still have the same problem?

@fontanil
Copy link
Author

fontanil commented Feb 2, 2023

Hello,

I didn't update Astroid to 2.6.3 because I didn't find why I have the error. Perhaps will I need to uninstall Template One et recreate new styles... but the template had been extensively customised.

@Chacapamac
Copy link
Collaborator

You should try to upload a test, like that we can have a go at it.

Yeah I will try to create new layout and export-import the original layout to see if the problems follow in the new layout.

@fontanil
Copy link
Author

fontanil commented Feb 2, 2023

On a local copy of the site using Astroid Framework 2.6.2, I made a backup of the two styles and user.css file.
I uninstalled Astroid Template One, reinstalled it, imported the json file of the main style. I then duplicated this style and changed the custom css for the home page. All worked fine.
I updated the Framework to 2.6.3 and I have the same error. I really don't understand.

@sonvnn
Copy link
Member

sonvnn commented Feb 7, 2023

Hi @fontanil,

To find your issue, I need your admin account to debug. May you help me create a test site? I will check and find solution for it.

Thanks & Best Regards,
Sonny

@fontanil
Copy link
Author

fontanil commented Feb 7, 2023

Thanks Sonny, but the site is not mine, it's heavy and I can only test it on my local server.

@fontanil
Copy link
Author

I made a lot of tests: duplicating the template, created a child. No success, the styles are always the one of the first page I opened.

Si I tried to use Astroid template zero for the home page, imported the layout of the One for home, added the custom css code and deleted the custom.css file.
The layout works fine for home, but also for other pages: the background image is displayed and the backgroud of the center of the site remains transparent.
The home page (template zero) is using this custom.css code (no custom.css file)

.astroid-framework {
background-image:url(/images/FONDKENNEDY.jpg)!important;
}
.astroid-layout.astroid-layout-boxed .astroid-wrapper {
background-color:transparent!important;
box-shadow: none;
}
The template one (by default) is using a custom.css file with this code and other css rules:

.astroid-framework {
background-image:none!important;
}
Why the image of the template zero style is used with the template one style?

I remind you that the error does not occur with the Astroid Framework 2.6.2, only with 2.6.3 (and the 2.6.3 templates)
Did the Astroid cache change in 2.6.3?

@fontanil
Copy link
Author

Last try: I removed the background image in the custom css for template zero and add it in the layout settings --> background image
No change although it's not the same template style.

@Chacapamac
Copy link
Collaborator

I check again on my test site and it work without problem —> http://joom4-astro.graf-test.ca/

This time I did exactly what you try to achieve.
• Using two styles (not child template) of Astroid One.
— One style as default with a color background color, no image
— the other for the home only with a background picture

Note:
• It work with the “Boxed” and the “Wide” Layout
• I use this custom css in the Astroid Manager
— “Home” style —> .astroid-framework { background-image:url(/images/Desert.jpg);}
— For the “Default” style for all other pages —> .astroid-framework { background-color: beige;}

For me, at this point it become extremely difficult to help you as I didn’t see any problem doing what you try to do with:
Joomla ‎4.2.7
PHP 8.1.15
Astroid Framework / Template One 2.6.3

Without an access to a copy of your website or your website it become really hard to fix your particular problem.

One thing, If something is wrong on your website its a big chance that you should have some errors generated, did you look for errors in your browser inspector or in the errors logs of the server?

Second:
If you send me a email to p.toulze@grafcomm.ca, I can give you access to my test website, if it can help You.

@fontanil
Copy link
Author

Thanks Chacapamac,

I created a new site, installed Astroid 2.6.2 and the two templates, duplicated One and imported the layout for the three styles.
With Astroid 2.6.2, no problem. Then I updated to 2.6.3 and all works fine.

But on the production site and on its local copy, it works with the 2.6.2 version, not with the 2.63, and no info in the console of Firefox.
So I'm wondering how I'm going to be able to do this on the production site, as I don't have an explanation of what caused the problem.

@Chacapamac
Copy link
Collaborator

As I was saying, without an access to the production website or a copy, at this point we cant really find the problem.

If you give me a zip copy of your website and the database, I can test it locally. Even better, You can use the free version of Akeeba Backup and send me the restoration file. I can have a look.

https://www.akeeba.com/download.html

@fontanil
Copy link
Author

The problem is simple: the specific layout is used, one for home page and one for the other pages, not the custom CSS code.
I need to clear the Astroid cache to change the custom css (in the media folder).

@Chacapamac
Copy link
Collaborator

I @fontanil
Something to clarified...

You said

• The problem is simple: the specific layout is used, one for home page and one for the other pages,

Yes, I understand, this is what I used in my test website —> http://joom4-astro.graf-test.ca/
You can see my 2 layout in my previous post —> #262 (comment)

You said:

not the custom CSS code. I need to clear the Astroid cache to change the custom css (in the media folder)

What do you mean by that, are you CSS to control the background are in the Astroid Template manager (one different code for each layout) or in the custom.css?

@fontanil
Copy link
Author

fontanil commented Feb 15, 2023

Hi,

There are two styles, each with its own layout and common CSS (in the layout or in a custom file) plus the transparent background and the image for the home page only.
With Astroid 2.6.2, I can change the page from home to another or another to home and I have no problem.
With Astroid 2.6.3, the CSS of the first opened page is used for the others: after clearing the cache if I open the home, the image and the transparent background is used on the other pages; if I first open another page, when I open the home page, the background has no image and the background of the site is not transparent. I need to clear the cache (or wait Cache cleaner automatic clearing) to get the right CSS for the actual page.

I sent you an email (in french) from another email address (on orange.fr).

@Chacapamac
Copy link
Collaborator

Chacapamac commented Feb 15, 2023

I receive your email and waiting for your test website access by email.
Now, with an access we can do a deeper troubleshooting.

@fontanil
Copy link
Author

You will receive an email with credentials from a "formations64.com" address.

@Chacapamac
Copy link
Collaborator

@fontanil , I think I fix the problem.
You were right, something is fishy with the Layout Settings —> Background Image

Screen Shot 2023-02-15 at 1 54 28 PM

Setting the image here, seem to traverse to others layouts, sometimes, most of the times ???????

I clear the image in the Layout Settings —> Background Image
and add this code to the Home Page Layout “Custom Code”

.astroid-framework.tp-style-25 {
    background-image:url(/images/FONDKENNEDY.jpg);
}

Seem to work 100% of the times....

I think @sonvnn should look at this to find exactly the cause
You should send him some admin keys to take a deep look now that you have a test website online. If it was working in 2.6.2 it should work in 2.6.3.
I’m going to check if it happen on my test website and come back here....

@Chacapamac
Copy link
Collaborator

@fontanil , @sonvnn
It work perfectly on my 2.6.3 test Website?????

@fontanil
Copy link
Author

Thanks Chacapamac!
I needed to add ".tp-style-25" to the transparent background, so it's white on the other style.
The solution works well on the production site.

@Chacapamac
Copy link
Collaborator

Chacapamac commented Feb 16, 2023

Great @fontanil, well, at least it work, its definitively a bug, I will check later on your test website.

Don’t forget to send some admin keys to @sonvnn , He is busy, but he will probably find why the background image set in a layout style appear on page with a different layout style.

Maybe it’s only a problem of cache, I’m not sure as my test website —> http://joom4-astro.graf-test.ca/
Work perfectly with or without cache?????

Good Day!

@fontanil
Copy link
Author

Thanks @Chacapamac !

On the test site, no cache, only Astroid cache was used. On the production site, Litespeed is used with its cache plugin.
On both sites, the background image was set on the custom code, without ".tp-style-25" when the error occured with Astroid 2.6.3, and I changed to the layout style with no change.
On the new site (only blog samples) I created where I added the same template and its options and CSS from the production site, it worked as on your test site.

@sonvnn sonvnn linked a pull request Feb 20, 2023 that will close this issue
@sonvnn
Copy link
Member

sonvnn commented Feb 20, 2023

Hi @fontanil

Thank you for your support. I check your site and found the issue. It's a bug when system minify CSS. It generate a version for 2 styles. I fixed this issue on 9c5fc04

Please help me download developer branch and test on your site https://github.com/templaza/astroid-framework/archive/refs/heads/developer.zip

Thanks & Best Regards,
Sonny

@fontanil
Copy link
Author

fontanil commented Feb 20, 2023 via email

@Chacapamac
Copy link
Collaborator

Make total sens for the Minify....
@fontanil — Just tell Us if we can mark the Issue as Solved?

Good Day to All!

@fontanil
Copy link
Author

Hi,

As I said, it works.
The issue can be closed.
Thanks!

@Chacapamac
Copy link
Collaborator

Great Day to Everybody!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Keys Asked bug Something isn't working SOLVED!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants