fbpx

Astroid 2.4 Landed with Joomla 4 Compatibility Download Now

Welcome, Guest
Username: Password: Remember me

TOPIC: Minify JS causes website not to show

Minify JS causes website not to show 1 month 3 weeks ago #23987

  • Daan
  • Daan's Avatar
  • Offline
  • New Member
  • Posts: 15
  • Karma: 0
Once i turn on Minify JS, website loads infinitely(does not show up).


This is clean joomla install only with Astroid framework(quickstart).
Once i turn off Minify JS it works.....but how do i make it work with Minify JS active?

Thank you
Last Edit: 1 month 3 weeks ago by Daan.
The administrator has disabled public write access.

Minify JS causes website not to show 1 month 3 weeks ago #23996

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4151
  • Thank you received: 607
  • Karma: 108
Hi,

It could be that the amount of resources (memory and other PHP resources) are not allowing for the minification to finish and thus the page is never loading.

I'd suggest allowing some more resources as suggested here: docs.joomdev.com/article/technical-requisites/

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

Minify JS causes website not to show 1 month 3 weeks ago #24028

  • Daan
  • Daan's Avatar
  • Offline
  • New Member
  • Posts: 15
  • Karma: 0
admin wrote:
Hi,

It could be that the amount of resources (memory and other PHP resources) are not allowing for the minification to finish and thus the page is never loading.

I'd suggest allowing some more resources as suggested here: docs.joomdev.com/article/technical-requisites/

Thanks,
Chetan

Hi Chetan,
thank you for your reply.

As you suggested i tried with higher parameters, but still the same problem persists.
I also went into joomla backend to check php information, this is what it shows:


Let me know if logs or access can help you in patching this issue?
Dan
Last Edit: 1 month 3 weeks ago by Daan.
The administrator has disabled public write access.

Minify JS causes website not to show 1 month 3 weeks ago #24029

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4151
  • Thank you received: 607
  • Karma: 108
Hi Dan,

Are you able to see any request timeout in the PHP error logs?

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

Minify JS causes website not to show 1 month 3 weeks ago #24030

  • Daan
  • Daan's Avatar
  • Offline
  • New Member
  • Posts: 15
  • Karma: 0
admin wrote:
Hi Dan,

Are you able to see any request timeout in the PHP error logs?

Thanks,
Chetan

i had to CTRL+U, to see the code, because preloader screen is infinitely loading and not showing anything.

After enabling in PHP(cPanel) display_errors parameter, this is shown in source code:
<br />
<b>Warning</b>:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in <b>/home/poligon/public_html/radnastranica/libraries/astroid/framework/library/astroid/Document.php</b> on line <b>275</b><br />
<br />
<b>Warning</b>:  file_get_contents(https://code.jquery.com/jquery-3.3.1.min.js): failed to open stream: no suitable wrapper could be found in <b>/home/poligon/public_html/radnastranica/libraries/astroid/framework/library/astroid/Document.php</b> on line <b>275</b><br />
<br />
<b>Warning</b>:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in <b>/home/poligon/public_html/radnastranica/libraries/astroid/framework/library/astroid/Document.php</b> on line <b>275</b><br />
<br />
<b>Warning</b>:  file_get_contents(https://parsleyjs.org/dist/parsley.min.js): failed to open stream: no suitable wrapper could be found in <b>/home/poligon/public_html/radnastranica/libraries/astroid/framework/library/astroid/Document.php</b> on line <b>275</b><br />
<br />
<b>Warning</b>:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in <b>/home/poligon/public_html/radnastranica/libraries/astroid/framework/library/astroid/Document.php</b> on line <b>275</b><br />
<br />
<b>Warning</b>:  file_get_contents(https://cdn.jsdelivr.net/npm/pikaday/pikaday.js): failed to open stream: no suitable wrapper could be found in <b>/home/poligon/public_html/radnastranica/libraries/astroid/framework/library/astroid/Document.php</b> on line <b>275</b><br />

Hope this helps diagnosing whats wrong.
Dan
The administrator has disabled public write access.

Minify JS causes website not to show 1 month 3 weeks ago #24031

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4151
  • Thank you received: 607
  • Karma: 108
So, so what's it's doing it trying to download these files and add them to the minified file.

You have 2 options.

1. Exclude these 3 files by file name using the exclude in put box.
2. enable file_get_contents function in PHP. It seems to be displayed in your PHP config.

I'd prefer #2.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

Minify JS causes website not to show 1 month 3 weeks ago #24033

  • Daan
  • Daan's Avatar
  • Offline
  • New Member
  • Posts: 15
  • Karma: 0
admin wrote:
So, so what's it's doing it trying to download these files and add them to the minified file.

You have 2 options.

1. Exclude these 3 files by file name using the exclude in put box.
2. enable file_get_contents function in PHP. It seems to be displayed in your PHP config.

I'd prefer #2.

Thanks,
Chetan

Maybe its worth mentioning again, this is JoomDev default clean quickstart installation, i haven't installed any third party extensions into it.
It would be ideal if user doesn't have to fiddle with this manually, otherwise it defeats the purpose of GUI and this feature alone in Astroid.

Following your advice, i did include files in exclude box, however it still doesn't work out, see here:


Regarding allow_url_fopen, please be aware of the security implications of enabling the allow_url_fopen directive. PHP scripts that can access remote files are potentially vulnerable to arbitrary code injection. This is disabled by default on most shared web hosting servers.

In conclusion, this Astroid feature, Minify JS(Minify & combine all JS) is broken, as it doesn't work out of the box. Unless you create new patch.
Otherwise, Astroid is great Joomla framework, but still needs to be polished.....you could make it dominant Joomla framework, which is a big deal....but only if you iron out these kinks.
Last Edit: 1 month 3 weeks ago by Daan.
The administrator has disabled public write access.

Minify JS causes website not to show 1 month 3 weeks ago #24074

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4151
  • Thank you received: 607
  • Karma: 108
Thank you for the feedback. The Minifcation feature is indeed experimental and something we plan to polish as we get more feedback.

This is helpful and will have an update on this one soon enough.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.368 seconds