Jump to content

RockFrontend 🚀🚀 The Powerful Toolbox for ProcessWire Frontend Development


Recommended Posts

Hello Bernhard,

I updated/upgraded ProcessWire and RockFrontend recently (ProcessWire 3.0.239, RockFrontend 3.15.1, PHP 8.1).

I've just noticed 2 error messages in the consoles in Vivaldi and Firefox.
(Debug mode is on. It's the same when it's off.)
I wanted to try the Scrollclass so I added this in _init.php (RockFrontend profile):

->add('/site/modules/RockFrontend/RockFrontend.min.js', 'defer')

I'm not sure if it works as intended as there is one error message related to RockFrontend.min.js.

The error message related to RockFrontend.js (so the non minified version) already exists when the above code related to RockFrontend.min.js is not added.
I don't remember noticing this error message related to RockFrontend.js before.

So now, I see this in Firefox:

Uncaught ReferenceError: assignment to undeclared variable j
    <anonymous> http://domainname.fr/site/modules/RockFrontend/RockFrontend.min.js?m=1716312961:5
    <anonymous> http://domainname.fr/site/modules/RockFrontend/RockFrontend.min.js?m=1716312961:5
Uncaught ReferenceError: assignment to undeclared variable j
    <anonymous> http://domainname.fr/site/modules/RockFrontend/RockFrontend.js?m=1716312961:258
    <anonymous> http://domainname.fr/site/modules/RockFrontend/RockFrontend.js?m=1716312961:270
    <anonyme> http://domainname.fr/site/modules/RockFrontend/RockFrontend.js?m=1716312961:258
    <anonyme> http://domainname.fr/site/modules/RockFrontend/RockFrontend.js?m=1716312961:270

And this in Vivaldi (chrome-based):

RockFrontend.min.js?m=1716312961:5 Uncaught ReferenceError: j is not defined
    at RockFrontend.min.js?m=1716312961:5:279
    at RockFrontend.min.js?m=1716312961:5:534
(anonymous) @ RockFrontend.min.js?m=1716312961:5
(anonymous) @ RockFrontend.min.js?m=1716312961:5
RockFrontend.js?m=1716312961:258 Uncaught ReferenceError: j is not defined
    at RockFrontend.js?m=1716312961:258:12
    at RockFrontend.js?m=1716312961:270:3
Link to comment
Share on other sites

Hi Bernhard,

I removed RockFrontend.min.js because it's not needed as RockFrontend.js is already added automatically.

The browser says it is related to the following line, certainly the only place where j is mentioned: (j = 0; j < attrs.length; j++) {

I was just testing the rf-scrollclass attribute (with the css that is included in the docs): 

<footer class="tm-prose">
  <div class="uk-container">
    <div class="uk-text-right">
      <a href='#' rf-scrollclass='to-top show-desktop@300 show-mobile@600'>Scroll to top</a>

I don't know the reason for the error message, so I'm just removing the attribute for the moment.
I'll try again another time.

Have a nice evening!


  • Like 1
Link to comment
Share on other sites

Hey @netcarver and @gebeer great news for you (and all RockFrontend users)

I've fixed an issue with ajax endpoints not replacing ALFRED markup (thx for the report @gebeer) and while working on that I got quite a lot of errors in the console about the livereload stream having a wrong mimetype, which has also been observed and reported by @netcarver some time ago.

So I fixed that as well 🙂 Please try the latest version on the dev branch, which will be merged to master in some days.

LiveReload only reloads the visible tab. This is to avoid endless loops where one window reload causes the other one to reload as well and vice versa. In older versions you had to reload the tab manually once you switched back to it. In the latest version it will wait and as soon as you switch back to the tab it will be reloaded automatically if a file changed in the meantime 🚀

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...