It was working perfect yestarday but today the captcha does not appear anymore. I debuged the code and I realized that my joomla plugin captcharecaptcha is including this file when rendering the page as a javascript file
http://api.recaptcha.net/js/recaptcha_ajax.js
But if I hit the link directly from my browser I get 404 not found. Anyone have any similar problems with this today? Did the path of the js file changed?
you can change the endpoints
From
const RECAPTCHA_API_SERVER = "http://api.recaptcha.net";
const RECAPTCHA_API_SECURE_SERVER = "https://www.google.com/recaptcha/api";
const RECAPTCHA_VERIFY_SERVER = "api-verify.recaptcha.net";
to
const RECAPTCHA_API_SERVER = "http://www.google.com/recaptcha/api";
const RECAPTCHA_API_SECURE_SERVER = "https://www.google.com/recaptcha/api";
const RECAPTCHA_VERIFY_SERVER = "api-verify.recaptcha.net";
and it will work. I guess it will work with any version of joomla
To fix this you need to change file /plugins/captcha/recaptcha/recaptcha.php
line 24
const RECAPTCHA_API_SERVER = "http://api.recaptcha.net";
to
const RECAPTCHA_API_SERVER = "http://api.recaptcha.net/recaptcha/api";
Google has change recaptcha code path and joomla hasn't still fixed this.
I had the same problem but I changed it to
http://www.google.com/recaptcha/api/js/recaptcha_ajax.js
and now it's working again. Hope this helps!
Related
Using the webview_flutter with evaluateJavascript(), I've been able to modify the style of most elements of my website, but can't understand why some elements don't get modified.
My WebView is included, and the website to display within the WebView is https://dme.com.sg/index.php?dispatch=auth.login_form
I've included a snapshot as well, showing how I can hide and modify the colours for most of the elements, yet it seems all those that are within the "form" cannot be changed.
Would appreciate any help on how I can modify those as well, especially to change their colours to a darker theme to match the colours of the app.
WebView(
initialUrl: 'https://dme.com.sg/index.php?dispatch=auth.login_form',
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (controller) {
_controller = controller;
},
onPageStarted: (url) {
_controller.evaluateJavascript(
"document.getElementsByClassName('tygh-top-panel clearfix')[0].style.display='none';"
"document.getElementsByClassName('tygh-header clearfix')[0].style.display='none';"
"document.getElementsByClassName('tygh-header')[0].style.display='none';"
"document.getElementsByClassName('tygh-footer')[0].style.display='none';"
"document.getElementsByClassName('auth-information-grid')[0].style.display='none';"
"document.getElementsByClassName('ty-breadcrumbs clearfix')[0].style.display = 'none';"
"document.getElementsByClassName('container-fluid content-grid')[0].style.background = 'black';"
"document.getElementsByClassName('ty-mainbox-title')[0].style.color = 'pink';"
"document.getElementsByClassName('buttons-container clearfix')[0].style.display = 'none';"
);
},
),
Have kept tinkering around with it, and looking up JavaScript tutorial, and I managed to find a solution. So I'm not sure HOW or WHY, so still hoping someone could comment a response that explains so I can better understand.
Something else I've learnt, it's easier to just use the "console" tab of chrome to test the java scripts on the page before moving it into flutter webview.
Using the "document.getElementsByClassName("buttons-container clearfix")" command, I got a list of where the class was being used, and found the one I wanted to change was 1. It helps that when as you type the right index number, it gets highlighted on the website.
So then using "document.getElementsByClassName("buttons-container clearfix")1.style.background = 'black'" I managed to change the style of the element I wanted.
I've included a screengrab of the chrome console here if it can help anyone else.
I'm migrating extension for Opencart 2.3 to Opencart 3. Everything seems to work fine, except that I can't enable the extension. When I go to extension->shipping the status doesn't change it stays disabled, however if I go to settings, the drop down shows that enabled is selected. There aren't any errors on the front-end, or in the log files. I tried debugging but everything seems fine. Any ideas what may be wrong? Also the setting in the database(extensionName_status) is 1
Note: the extension is large, and it will be too much if I post it here. If you need specific fragment of code, I will provide it.
The tricky thing about the 2.3->3.0 migration was that some variable names changed in a subtle way (as noted in my comment above). The status variable could be your problem. Here's Better Together 3.0 (left) vs 2.3 (right) in the controller file:
< $data['total_better_together_status'] = $this->config->get('total_better_together_status');
---
> $data['better_together_status'] = $this->config->get('better_together_status');
If your OpenCart 3.x module is labeled in the Modules category, then:
if (isset($this->request->post['module_mymodule_status'])) {
$data['module_mymodule_status'] = $this->request->post['module_mymodule_status'];
} else {
$data['module_mymodule_status'] = $this->config->get('module_mymodule_status');
}
Or if it's labeled in the Analytics category, then you just change the module to analytics as shown below:
if (isset($this->request->post['analytics_mymodule_status'])) {
$data['analytics_mymodule_status'] = $this->request->post['analytics_mymodule_status'];
} else {
$data['analytics_mymodule_status'] = $this->config->get('analytics_mymodule_status');
}
I am trying to learn how to use Qt Assistant for displaying a custom help in an application.
I found an example on Qt site:
http://qt-project.org/doc/qt-4.7/help-simpletextviewer.html
(using Qt 4.7.3)
All the source files needed are at the site above. I created html and png files and placed them in a "help" folder inside the project folder.
Running Qt Assistant from command line works great.
Loading the help file in the Assistant also works. What I can't get to do is to load the start page in the help file, as explained in this section:
http://qt-project.org/doc/qt-4.7/assistant-custom-help-viewer.html#id-0c628592-dd04-4465-94b1-e5d4a91d7cd4
void Assistant::showDocumentation(const QString &page)
{
if (!startAssistant())
return;
QByteArray ba("SetSource ");
ba.append("qthelp://com.trolltech.examples.simpletextviewer/doc/");
proc->write(ba + page.toLocal8Bit() + '\n');
}
With the detailed explanation of SetSource showing
setSource <Url> Displays the given <Url>. The URL can be absolute or relative
to the currently displayed page. If the URL is absolute, it has to be
a valid Qt help system URL; i.e., starting with "qthelp://".
I don't have a web page... but i tried to display the index from the local set of files, and i always get
a 404 error saying "cannot load page blahblah/help/index.html"
How can I create a local path as they say, or how can I create a "valid Qt help system URL" ?``
Note: SetSource and setSource have exactly the same results... and documentation and their own examples use them both... are these options not case sensitive ?
I answered my own question with a solution that doesn't seem right though... I would appreciate a better answer.
There must be something wrong with either my solution or the documentation...
I was able to get the page to display by changing an option...
replace QByteArray ba("SetSource ");
with QByteArray ba("Set Source ");
I am trying to use SVNKit to get a Log of the SVN Entries in Coldfusion. I downloaded the latest SVNKit jar files and threw them in the lib folder under WEB-INF/lib.
Here is my code that should return an Array Of Log Entries but this code is returning a Null Pointer exception in Coldfusion 9.0.2.
SVNURL = createObject('java','org.tmatesoft.svn.core.SVNURL').parseURIEncoded(svnurl);
drf = createObject("java","org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory");
drf.setup();
rf = drf.create(SVNURL);
SVNWCUtil = createObject("java","org.tmatesoft.svn.core.wc.SVNWCUtil");
authManager = SVNWCUtil.createDefaultAuthenticationManager(user,pass);
rf.setAuthenticationManager(authManager);
log = rf.log(JavaCast("String[]",[]),JavaCast("null",""),JavaCast("long",10),JavaCast("long",15),true,true);
rf.closeSession();
When running this code, I receive the following Error.
The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Null Pointers are another name for undefined values.
Which points to this line..
log = rf.log(JavaCast("String[]",[]),JavaCast("null",""),JavaCast("long",10),JavaCast("long",15),true,true);
I moved this same code over to Railo, and everything is running fine. I just cannot see why ACF is choking on the log() method.
I was using the Printing Out Repository History example on the SVNKit Wiki to start me off.
Any suggestions on getting it to work in Adobe Coldfusion would be greatly appreciated. I did not test on CF10.
I wasn't using the JavaCast("boolean",true) for the last two arguments in the log() function. After that, everything worked fine.
Got to remember to check and use JavaCast()!
log = rf.log(JavaCast("String[]",[]),JavaCast("null",""),JavaCast("long",10),JavaCast("long",15),JavaCast("boolean",true),JavaCast("boolean",true));
I search for a way to test my extbase-extension. I work with two different templatepaths for front- and backend.
module.myext{
view {
templateRootPath = myext/Resources/Private/Backend/Templates/
partialRootPath = myext/Resources/Private/Backend/Partials/
layoutRootPath = myext/Resources/Private/Backend/Layouts/
}
}
The backendmodule works without any problem, but my test will not get the different templatepath. If i write the view.templateRootPath to config.tx_extbase in the ext_typoscript_setup.txt it works, but in this case all my frontendtests do not work any more. The simplest way to resolve this issue is to merge the templatepaths and work with only one, but there must be a way around this solution.
Does somebody has an idea?
Did you statically include the extension setup in your root page?
Then the backend module should work as long as you include it in the web tools and select the root page in the page-tree...
If you include your module in the user tools, this is a known bug. See here:
http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2011-December/011174.html
You could put this code in your *ext_localconf.php*:
if (TYPO3_MODE === 'BE') {
t3lib_extMgm::addTypoScript($_EXTKEY, 'constants', $tsIncludeConstants);
t3lib_extMgm::addTypoScript($_EXTKEY, 'setup', $tsIncludeSetup);
}
where $tsIncludeXXis your TS code to include the configuration files of your extension:
$tsIncludeConstants = "<INCLUDE_TYPOSCRIPT: source=FILE:EXT:$_EXTKEY/Configuration/TypoScript/constants.txt>";
$tsIncludeSetup = "<INCLUDE_TYPOSCRIPT: source=FILE:EXT:$_EXTKEY/Configuration/TypoScript/setup.txt>";
This is kind of brute force, but it works...