• Resolved macnux

    (@macnux)


    Hi,

    I’m inserting this ad and it works perfectly without FVM:
    cb.cmd.push(function(){cb({playerId:"1c29db-b110-4350-9460-5346a3b47"}).render("612e04d63a69bed46a146c9a4")})};});}

    After using FVM 3.2.2, and when enabling the option: Enable JS Processing, the code becomes:
    cb.cmd.push(function(){cb({playerId:"1c29db-b110-4350-9460-5346a3b47"}).render("612e04d63a69bed46a146c9a4")})

    As you can see, it omits the semicolons and some brackets, and as a result, the ad is not working…
    The code only works when I downgrade FVM and use the older version 3.1.4.

    Regards,

    • This topic was modified 3 years, 4 months ago by macnux.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Raul P.

    (@alignak)

    Thank you for reporting.
    The code is being minified by PHP Minify and it looks correct to me.

    What does not look correct is your original code, are you sure that is supposed to look like that?

    Your original indented code:

    cb.cmd.push(function() {
        cb({ 
            playerId: "1c29db-b110-4350-9460-5346a3b47" }).render("612e04d63a69bed46a146c9a4") 
        })
    	
    	};
    	});
    }

    where

    };
    });

    is incorrect, or perhaps you did not post the whole code.
    This is either added incorrectly, or there should be some code before.
    For every } there should be an { usually, as well as for ( and ).
    The semicolon, can be replaced with a line break, in some cases too.

    Thread Starter macnux

    (@macnux)

    Hi,

    This is the exact input script:

    <script>
    cb.cmd.push(function(){
    	cb({
    		playerId:"1c29db-b110-4350-9460-5346a3b47"}).render("612e04d63a69bed46a146c9a4")
    		;});
    </script>

    And after using FVM 3.2.2 The generated output is:

    <script id="612e04d63a69bed46a146c9a4" type="fvm-script-delay">
    cb.cmd.push(function(){
    	cb{
    		playerId:"501c29db-b110-4350-9460-0453476a3b47"}).render("612e04d63a69bed46a146c9a4")
    		})
    </script>

    FVM omits some brackets and semicolons as you can see.

    • This reply was modified 3 years, 4 months ago by macnux.
    Thread Starter macnux

    (@macnux)

    Any help?

    Thread Starter macnux

    (@macnux)

    The solution now is to enable the option called: Disable JS Inline Minification.

    It works when enabling this option and semicolons are now appeared and the script runs successfully.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bug in version 3.2.2’ is closed to new replies.