Parsley 2.0 noconflict with $ - parsley.js

I am using the new Parsley version (2.0) and I have a problem with $. I put parsley+remote.js and the console says me:
"$ is not a function".
I have in my jsp the next code:
var j = jQuery.noConflict();
With Parsley 1.x I never had problems. Any idea?

It should be fixed in new released RC3 version. Best

Related

SCRIPT1002: Syntax error - IE 11 , on my Next js

So I migrated from CRA to Next Js. At first my app is working fine on IE 11 while I'm migrating from CRA to next js (I was testing it on IE every time I'm making changes). But then I forgot to test on IE, and now I fully migrated my app on nextjs, and I tried to open it on IE, now the page doesn't fully load because of this error, ( on both dev mode and prod mode). I notice that this error occurs when I'm trying to add my page and component that has socket io-client, I think the error is in debug/src/browser in node_modules. What I don't get is my CRA app also has this dependency, but why it works on IE while the Nextjs version doesn't? I used my old CRA app and just installed next, and made changes, so it has babel.
This is the error:
SCRIPT1002: Syntax error
_app.js (24050,23)
Now when I click it, this is the code where the error occurs
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = localstorage();
exports.destroy = (() => {
let warned = false;
return () => {
if (!warned) {
warned = true;
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
}
};
})();
Please help me! thank you.
I downgraded my socket.io-client version to socket.io-client#2.3.1

Angular syntax not working after upgrading to Angular 1.3.20

Recently we have updated our application to angular 1.3.20 version. But after the upgradation the existing code is throwing angular error.
app.controller('searchController', ['$scope','TemplateViewService','$http','SearchService','$browser','$rootScope','$state','$location', '$uibModal','ReadConfigurationService','$filter','SpinnerService','$log', function($scope,TemplateViewService,$http,SearchService,$browser,$rootScope,$state,$location, $uibModal,ReadConfigurationService,$filter,SpinnerService,$log){//PA1501-1206
var productType = undefined;
//PA1501-2173 start
$scope.dataList = SearchService.getDataList();
$scope.dataListCopy = SearchService.getDataListCopy();
$scope.deleteList = [];
$scope.displayArtifactList=[];
};
Here at this line I am getting Angular Js error Unknown provider TemplateViewService <- searchController.
Can anyone please suggest, how to resolve this error.
This is happening because of TemplateViewService js file is not getting compiler, please make sure it again....

How to test autocomplete using phpunit selenium2

I'd like to make a test with an autocomplete Jquery field, I can't access the hidden field attached to it.
I searched on Google, without success :(
Do you have any examples for testing that ?
Below, our test code:
function testTest(){
$this->url("/");
$input = $this->byLinkText("Développement / programmation");
$input->click();
$input = $this->byId("js_header_autocomplete_activity");
$input->clear();
$input->value("Développement / programmation");
}
I was able to do it with phpunit selenium 1 but it's now deprecated.
Any solutions ?
Regards,
William

Expression Engine Sidebar Nav issue post migration

I am a novice with EE but I am working in an environment where we migrated the EE from one host to another and post-migration I am having an issue with the nav bar where it is displaying code:
$nav): $class = ($nav['url_title'] == 'about-us') ? ' class="current"' : ''; echo ''.$nav['title'].''; if($nav['url_title'] == 'about-us'): ?>Company Overview
Our History
'; endforeach; ?>
Screenshots located here: http://www.evernote.com/l/AAMKcm-337JD3o9Wv2L6kmDUk6eCGA1Sbd0/
Any thoughts? This is not occurring on the original server.
Not 100% sure, but my guess would be that your old server was running PHP 5.4+, and your new server is < PHP 5.4. PHP 5.4 brought array shorthand syntax, and your new server seems it might not support it?
Hope this helps!
My guess is that your old host had short_open_tag turned on in php.ini while your new host does not.
You could fix this either by turning short_open_tags on in your .ini file or replacing <? with <?php in your template.
Would also check to confirm that php parsing is turned on in the template and the it is called at the expected parsing stage (input or output -- based on your snipped am guessing you need 'output').

cucumber file download confirm

I have a cucumber step where the file gets downloaded, but i am unable to click the save button in the dialog box that a browser provides, with cucumber step.
I have found some pages which solves the similar kind of problems, but it didn't solve mine
How to test a confirm dialog with Cucumber?
I have included this cucumber step for file download
When /^I confirm a js popup on the next step$/ do
page.evaluate_script("window.alert = function(msg) { return true; }")
page.evaluate_script("window.confirm = function(msg) { return true; }")
end
But didn't work.
Thanks
Did you try the page.driver syntax?
i.e., from: How to test a confirm dialog with Cuccumber?:
When /^I confirm popup$/ do
page.driver.browser.switch_to.alert.accept
end
When /^I dismiss popup$/ do
page.driver.browser.switch_to.alert.dismiss
end
ian.
I know this is old, but since this was one of the first SO posts I came across when searching for solutions, I figured I'd post a solution.
We can use good ol Ruby, along with open-uri (so include open-uri in your Gemfile if you aren't already using it):
Then /^I receive a PDF$/ do
link_url = find_link("Report")[:href]
file = open(link_url)
file.content_type.should == 'application/pdf'
end

Resources