ReCaptchaV2 g is undefined - recaptcha

I've an error since today in my website with recaptchaV2 from Google, I've an js error TypeError: g is undefined from recaptcha__fr.js file.
I used this captcha in Joomla form aicontactsafe
Everything has been working well since 1 or 2 years and I did not change anything.
I don't understand why I have this error, I included https://www.google.com/recaptcha/api.js and I called captcha whith <div class="g-recaptcha" data-sitekey="your_site_key"></div>
Any ideas?

Are you using Mootools?
It looks like there is an issue with the Google Library and Mootools as mentioned here - https://github.com/google/recaptcha/issues/374
I have a legacy site that started having issues at the end of last week (24th April). It might be that an upgrade for MooTools is needed

Related

Laravel CRUD using Firebase

I'm trying to implement Realtime CRUD using Google Firebase in my web application,I've managed to retrieve data from the Firebase Database but I saw an error while inspecting elements.
Error:
Uncaught ReferenceError: $ is not defined at users:37
I've tried all possible solutions, these made the error gone but I can't add/update/delete data. basically none of this work
links:
ReferenceError: $ is not defined
Laravel 5 WebPack JQuery - $ is not defined
https://medium.com/#onwuka_gideon/fixing-laravel-jquery-is-not-defined-a316fd918e0a
I've followed every step on here:
*note that I am using Laravel 5.8 rather than 5.6
https://laravelcode.com/post/laravel-56-realtime-crud-system-using-google-firebase#
You can recreate the problem by following it.
include jQuery before firebase.js i.e.
recreated and worked as you mentioned in this LINK
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.9.1/firebase.js"></script>
Example Repo - GITHUB

Testing Vue.js components- Laravel Testing

I am looking at testing some Vue.js components, as part of a Laravel application. So, I have a component that is used in a blade template and makes a GET request during the mounted lifecycle hook. Say this request takes 800 ms. Is it possible to use phpunit in this situation- to check the resulting HTML after said request?
I tried using sleep(1) (yes, probably a horrible idea), to give the request time to finish up (not 100% on this methodology), but the expected text was not available on the page after this brief sleep.
Here is what I am hoping to do:
$this->actingAs($user)
->visit('/teams/' . $team->slug . '/players'); // request is made when this route is hit.
$this->see('There are currently no players for this team.')
->see('There are currently no temporary players for this team.');
The see() calls resulted in error- the HTML was not present. I also checked- through the HTML output by phpunit on error, and all that is available in the HTML is what is inside of the blade template- the Vue component is not rendered at the point in which the see() call is made.
I suppose I am after some advice or direction.
I appreciate that this may not be what you're after or even compatible based on the version of Laravel you're using but have you heard about Laravel Dusk in the latest version (5.4).
https://laravel.com/docs/5.4/dusk

Scaffolding error with CodeIgniter_2.1.2

I am using codeigniter 2.1.2 and I want to use scaffolding feature to add information to table. When I set this $route['scaffolding_trigger'] = 'scaffolding'; in routes.php and call it in controller $this->load->scaffolding('applicants'); I get the following Error:
Fatal error: Call to undefined method CI_Loader::scaffolding() in C:\xampp\htdocs\hmplatform\application\controllers\Applicant.php on line 6 So I am asking if I can find a library that contains scaffolding features because in this version I downloaded from GIT there is no scaffolding folder.
Scaffolding was depreciated in codeigniter. It isn't longer offered. The tutorials are outdated, so I'm guessing this is where you saw it?

joomla mootools upgrade crashes

I have a problem I'm trying to solve for a few days now.
We enabled the mootools 1.2 plugin in joomla 1.5 so we can use some libraries designed for mootools 1.2 .
It worked great, everything was working and we could continue our work.
Since the last time the script worked, we did some minor changes, adding squeezebox compatibility to the front end, included the cufon script so the page would look better,...
There were really only minor changes.
The next time I looked mootools crashed.
Internet explorer is throwing errors like :
Message: 'className' is null or not an object
Line: 335
Char: 2
Code: 0
URI: /plugins/system/mtupgrade/mootools.js
Message: Object doesn't support this property or method
Line: 1
Char: 47606
Code: 0
URI: /plugins/system/mtupgrade/mootools.js
Message: Number expected
Line: 1
Char: 2585
Code: 0
URI: /plugins/system/mtupgrade/mootools.js
And this errors are thrown on simple tasks like :
$('element').className='something';
The code wasn't changed and it worked perfectly before.
Can somebody push me into the right direction?
I already tried to undo the changes we made, didn't work.
Found the solution.
Seems that mootools was loaded 2 times. The second time it was loaded in the new template and therefore the errors.

Codeigniter 1.7.2: function image() seems to no longer exist, what is the replacement?

A society I belong to have a website which someone who left a few years ago set up. It was done using codeigniter (which was probably rather excessive given that the website is pretty simple.)
The server it is hosted on updated Php recently, which resulted in the website completely breaking. It now simply returns a page full of deprecated function error messages like
"A PHP Error was encountered
Severity: 8192
Message: Function set_magic_quotes_runtime() is deprecated
Filename: codeigniter/CodeIgniter.php
Line Number: 60
"
Reading the CodeIgniter documentation it seemed the new version would work fine with the latest PhP installed on the server. I installed a the latest version of CodeIgniter (1.7.2) and copied over the views and database settings. I now get an error message about the image() function being undefined:
"Fatal error: Call to undefined function image() in /public_html/newSystem/application/views/welcome_index.php on line 32"
I tried searching through all the CodeIgniter documentation, and couldn't find any reference to this function.
it is used in the following fasion:
<?=image('welcome_index_splash-text.gif')?>
which led me to believe it was related to the img() function which converts text into an element, but replacing image() with img() gave the same error message. (Well, with img being undefined instead of image)
Since I have never used CodeIgniter before, there is probably a very simple fix, but it doesn't seem readily available from the UsersGuide.
The lesson would be not to use a framework like CodeIgniter when static HTML would have done, but it wasn't my decision to set it up like this in the first place!
Thank you for any help.
Codeigniter has a helper function called img() which returns the HTML code for the image provided as argument. If you get that error you're probably not including the right helper library like this:
$this->load->helper('html');
in your controller.
Reference: http://codeigniter.com/user_guide/helpers/html_helper.html

Resources