Jefferson49 / Joomla_plugin_sexypolling_reloaded

Migration of the joomla plugin "Sexy Polling" to joomla 4.x
GNU General Public License v3.0
2 stars 3 forks source link

Module css #39

Closed thodorisgo closed 1 year ago

thodorisgo commented 1 year ago

Using the sexy polls module to display polls is not loading the css correctly. Instead when using the shortcodes the css is loaded corectly.

Jefferson49 commented 1 year ago

Can you explain this in more detail? Do you observe this with templates in the administrators backend? Or do you add some css classes to the module (also in admin backend). Or the template layout (or its css) not loading in the user frontend?

thodorisgo commented 1 year ago

While trying to display a poll by using your module there is no styling at all. But if i use a custom module with polls shortcode the styling is correct.

Jefferson49 commented 1 year ago

While trying to display a poll by using your module there is no styling at all

Can you post an example URL for this behaviour? Does it mean you only see the raw text without any styling? In the URL, you shared in the other issue, the styling looked fine.

thodorisgo commented 1 year ago

Yes that's exactly the issue. The link i shared has the poll loaded through shortcode. In case you can't reproduce it i can share a link to check for your self

Jefferson49 commented 1 year ago

Some further questions, just to be sure that we are talking about the same thing:

Is my understanding correct?

I have no experiences about custom modules and the combination with sexy polling. I guess that the vast majority of users is using sexy polling just as a module and I have no feedback about CSS issues or not showing the layout. On my own website and other test environments it works fine. Therefore, it is surprising that it does not work for you and - on the other hand - works as a custom module, which seems to be more challenging in general.

Can you check if you are facing the same behavior with another template? Maybe, the issue is related to your specific template?

For me, it is difficult to analyse further on this issue. I do not know if it is possible for you, but it would help if you could create an example and post the URL in order to have a look at it.

thodorisgo commented 1 year ago

Hey Jefferson here you can see the issue live https://tinyurl.com/sexypoll2 please let me know when you check it so i can unpublish it.

Jefferson49 commented 1 year ago

Thank you for providing the URL; this really helps a lot!

What I can see:

Therefore, there seems to be some modification to the CSS if used as a module in the T4 framework. On the T4 framework website, I found a statement that "CSS and JS optimization options help compress almost all the template's CSS and Javascripts and relevant Joomla's files to improve website performance."

My interpretation of the observed behavior is that the T4 framework takes the initial CSS, optimizes it in some way, and afterwards saves a modified CSS into /media/t4/optimize/css/. Maybe, if using sexy polling as a custom module, T4 will have no code implemented to optimize custom modules. In this case, no optimization seems to happen and the original CSS stays in place.

You might want to have a look at the configuration of the T4 framework on your website. Maybe, there are some configuration parameters to influence the CSS optimization. If not, you might probably have to continue with using sexy polling as a custom module.

thodorisgo commented 1 year ago

Yes there is an option to exclude specific css files from being copressed. i added there the generate.css and now it loads the css as it should via the module. Really sorry for bothering with issues that are caused by T4 framework. If i find any bug in the future i will try to check first if it's related to T4. Thank you

Jefferson49 commented 1 year ago

No problem; I am happy that you could solve the issue. For me, it is interesting to learn about different scenarios how the plugin is used.

Jefferson49 commented 1 year ago

One additional question: I guess you are using a Greek frontend translation for sexy polling. If it were o.k. for you, it might be possible to contribute the translation to the next release, which I plan in the next week. For the frontend, this is the following file: \components\com_sexypolling\language\el-GR\el-GR.com_sexypolling.ini

You can just attach the file to a (new) issue.

thodorisgo commented 1 year ago

With pleasure i will share my translation. PS: The path you provided is wrong. The tanslations are on the folder language on root folder and in my case \language\el-GR\el-GR.com_sexypolling.ini