enter image description hereOne of my client's Opencart website have issues when open the website, a prompt alert shows following code:
Conflict
<script>document.cookie = "humans_21909=1"; document.location.reload(true)</script>
How to get this resolve. Also help me to find the files where they are located to fix it.
Had the same issue, it only happened to me when the request was something to do with "register", in my case it was "register.php", I only changed the documents name and problem was solved
You need to change the filename of register.php and its occurrences on all places in the files.
In register_modal.tpl find this part (for me 582 line):
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
Comment this alert.
Enjoy!
It might be happening because of your function name is 'register' so you need to change the function name to some other name and check it.
Related
I want to get the row header text, after clicking on any specific row. It could be number/alphabet. Yes, I'm able to get its index. But I want to get its text value, which i'm needed to show elsewhere in my case. I didn't found any idea or solution in its documentation page Get Sheet Header. Hope, there's any way to figure out this problem. Thanks for any solution/advice.
You can get the row header text by using getCell and passing in the SheetArea.rowHeader variable. Here is how to do it on a cell click (or header click):
activeSheet.bind(GcSpread.Sheets.Events.CellClick, function (sender, args) {
if (args.sheetArea === GcSpread.Sheets.SheetArea.rowHeader) {
alert("Row header text: " + activeSheet.getCell(args.row, args.col, GcSpread.Sheets.SheetArea.rowHeader).value());
}
});
Let me know if that helps.
Regards,
Kevin
I appreciate all the need-to-haves that come right out of the box with Loopback.js but one area that could use some flexibility is the email verification that is sent upon user creation. This GitHub project helps illustrate this feature--but no where on SO or the Google Groups or in the documentation (yes, I checked there first) does it show how the actual text of the email verification can be changed.
I implemented the exact same code (as found at the previously referred-to GitHub project) in "verify.ejs"...namely:
<%= text %>
Right now the text that is inserted says:
Please verify your email by opening this link in a web browser:
I would like to refer to this user-interaction as "account activation"--not "email verification". The project has its own requirements that compels me to implement the change in semantics. Thank you in advance.
(You know open source rocks for so many reasons...the top reason for me right now is self-documented code.)
I looked at the source of User.verify(...) and discovered that the options which can be passed in are much more expansive than documented.
In the following code snippets (from Loopback's User model) you'll see what I mean:
options.host = options.host || (app && app.get('host')) || 'localhost';
options.port = options.port || (app && app.get('port')) || 3000;
// ### (later) ### //
options.text = options.text || 'Please verify your email by opening this link in a web browser:\n\t{href}';
options.text = options.text.replace('{href}', options.verifyHref);
So, in short, set these parameters in the options object passed in to User.verify():
var options = {
host: 'http://some.domain.com',
port: 5000,
text: 'Please activate your account by clicking on this link or copying and pasting it in a new browser window:\n\t{href}'
}
Source code for User.verify(..) found at: https://github.com/strongloop/loopback/blob/master/common/models/user.js
tx, that helped me.
to expand, the verification link options are
options.verifyHref = options.verifyHref ||
options.protocol +
'://' +
options.host +
displayPort +
options.restApiRoot +
userModel.http.path +
userModel.sharedClass.find('confirm', true).http.path +
'?uid=' +
options.user.id +
'&redirect=' +
options.redirect;
so, all the options there can be customized (particularly, options.restApiRoot was missing for me above).
alternatively, just set options.verifyHref yourself and only that one will be send as verification link
if you want just the href:
var options = {
text: '{href}'
}
try {
$return = $facebook->api("/" . $userFromDB["username"] . "/feed",
"post", array(
message => "",
picture => "http://blabla.net/blabla1/img/autopost/" . $blabla2 . ".png",
link => "http://apps.facebook.com/blabla1/?var2=" . $encryptedUserIds[$userFromDB["id"]], //$appPageURL
caption => "Tikla, begen.",
description => $var3,
access_token => $auth["auth_code"],
));
$usersPosted++;
} catch (FacebookApiException $e) {
$userProcessError++;
write_log("blabla");
}
Hello, this is the part of the code where i send posts to users' wall. If there is no exception, the code works flawlessly. Whenever an exception occures, I get this annoying fatal error.
I have tried many things to correct but the script is the same where I make calls to facebook api in other parts of my code.
I searched google and stackoverflow. Noone seems to have this error. Am i the only one? Thanks in advance.
This is the error:
Fatal error: Call to undefined method Facebook::throwAPIException() in facebook-php-sdk/src/base_facebook.php on line 870
Facebook sdk version i use: 3.2
Php version: 5.3
EDIT: this is how i get access_token for user. I store it into db:
if(isset($code) && $state==$authState){
$accessTokenInformation=file_get_contents($accessTokenURL . $code);
$tmpResult=explode("&", $accessTokenInformation);
if(sizeof($tmpResult)==2){
$tmpAT=explode("=", $tmpResult[0]);
$tmpExp=explode("=", $tmpResult[1]);
if(sizeof($tmpAT)==2 && sizeof($tmpExp)==2){
$tmpDBUserAuth=check_db_for_authcode_for_user(...);
if(empty($tmpDBUserAuth)){
insert_authcode_indb(...);
write_log(...);
}else{
update_authcode_indb(...)
write_log(...);
}
}else{
write_log(...);
echo(' top.location.href="'. $OAuthURL .'"; ');
}
}else{
write_log(...);
echo(' top.location.href="'. $OAuthURL .'"; ');
}
}
EDIT on 2012/11/06: Problem still persists. Please help.
Please check you FB API secrete keys are proper set or not ... I also faced this problem , but i have corrected secrete keys after that it was working perfect.
Try to use the following script
http://www.9lessons.info/2011/09/update-login-with-facebook-and-twitter.html
Fatal error: Call to undefined method Facebook::throwAPIException() in facebook-php-sdk/src/base_facebook.php on line 870
That error message does not make sense.
If I go to line 870 in that file in my IDE, and follow the method name to its declaration, it’s in the same file on line 1237 (all for current version 3.2.0).
So there is no plausible reason for a undefined method error there.
Could you please check if the SDK files got uploaded correctly to your server, or just re-download and re-upload them, to make sure its not a problem with mangled/truncated file contents?
I am hoping someone can help get me in the right direction...
I am using Powerbuilder 12 Classic and trying to consume a Oracle CRM OnDemand web service.
Using Msxml2.XMLHTTP.4.0 commands, I have been able to connect using https and retrieve the session id, which I need to send back when I invoke the method.
When I run the code below, I get the SBL-ODU-01007 The HTTP request did not contain a valid SOAPAction header error message. I am not sure what I am missing??
OleObject loo_xmlhttp
ls_get_url = "https://secure-ausomxxxx.crmondemand.com/Services/Integration?command=login"
try
loo_xmlhttp = CREATE oleobject
loo_xmlhttp.ConnectToNewObject("Msxml2.XMLHTTP.4.0")
loo_xmlhttp.open ("GET",ls_get_url, false)
loo_xmlhttp.setRequestHeader("UserName", "xxxxxxx")
loo_xmlhttp.setRequestHeader("Password", "xxxxxxx")
loo_xmlhttp.send()
cookie = loo_xmlhttp.getResponseHeader("Set-Cookie")
sesId = mid(cookie, pos(cookie,"=", 1)+1, pos(cookie,";", 1)-(pos(cookie,"=", 1)+1))
ls_post_url = "https://secure-ausomxxxx.crmondemand.com/Services/Integration/Activity;"
ls_response_text = "jsessionid=" + sesId + ";"
ls_post_url = ls_post_url + ls_response_text
loo_xmlhttp.open ("POST",ls_post_url, false)
loo_xmlhttp.setRequestHeader("COOKIE", left(cookie,pos(cookie,";",1)-1) )
loo_xmlhttp.setRequestHeader("COOKIE", left(cookie,pos(cookie,";",1)-1) )
ls_post_url2 = "document/urn:crmondemand/ws/activity/10/2004:Activity_QueryPage"
loo_xmlhttp.setRequestHeader("SOAPAction", ls_post_url2)
loo_xmlhttp.send()
ls_get_url = "https://secure-ausomxxxx.crmondemand.com/Services/Integration?command=logoff"
loo_xmlhttp.open ("POST",ls_get_url, false)
loo_xmlhttp.send()
catch (RuntimeError rte)
MessageBox("Error", "RuntimeError - " + rte.getMessage())
end try
I believe you are using incorrect URL for Login and Logoff;
Here is the sample:
https://secure-ausomxxxx.crmondemand.com/Services/Integration?command=login
https://secure-ausomxxxx.crmondemand.com/Services/Integration?command=logoff
Rest of the code looks OK to me.
I have run into similar issues in PB with msxml through ole. Adding this may help:
loo_xmlhttp.setRequestHeader("Content-Type", "text/xml")
you need to make sure that the your value for ls_post_url2 is one of the values that is found in the wsdl file. Just search for "soap:operation soapAction" in the wsdl file to see the valid values for SOAPAction.
i want to put rel=lightbox to some links that mediabox support using javascript.
i try this and wonder why it's not working?
test: http://jsbin.com/opica
please help edit this: http://jsbin.com/opica/edit
<script type="text/javascript">
var x=xmlDoc.getElementsByTagName("a");
var regexku=/^.+(((twit)|(tweet)|(com/video.+)|(flickr.com.+)|(tube.com.+))|((gif)|(jpe?g)|(png)|(flv)|(swf)|(mp3)|(mp4))$)/;
for(i=0;i<x.length;i++)
{
a=x[i].getAttribute('href');
if (a.match(regexku) != null)
{
x.item(i).setAttribute("rel","lightbox");
}
}
</script>
So if you open the Error Console (Tools -> Error Console in Firefox), you'll see two errors on your page:
Error: xmlDoc is not defined
Source File: http://jsbin.com/opica
Line: 35
Error: invalid regular expression flag v
Source File: http://jsbin.com/opica
Line: 21, Column: 38
Source Code:
var regexku=/^.+(((twit)|(tweet)|(com/video.+)|(flickr.com.+)|(tube.com.+))|((gif)|(jpe?g)|(png)|(flv)|(swf)|(mp3)|(mp4))$)/;
The later is fixed by escaping the slash as Bart suggested (com\/video).
The former says there's no such thing as xmlDoc. You probably meant the page's document, in which case you should replace it with document.
Next the whole thing probably won't work because you should run the script after the page is finished loading. In jQuery it's $(document).ready(function() { /* do your work here */ }), google how to do it using the whatever framework you're using (mootools-yui?).
After that as you can see, the rel attribute is set on the links: http://jsbin.com/elaca/edit. The fact that the whatever library you're using still doesn't work means you're using it wrong. You didn't even link to the page you've downloaded the library from so that someone could look up the documentation for you...
Try escaping the / between com and video.