K2 comments + reCaptcha issue - joomla2.5

I 've just installed reCaptcha public and private keys on my joomla 2.5 site and i found out that the K2 comments submission stopped working. All i see is a message: "Please enter the 2 words you see below" above the submit comment button but no words appear. Any ideas on this?
K2 version: 2.6.2

for some reason jQuery is not well loaded in your site.
Do the following:
Go to plugin, and ensure that K2 system plugin is enabled (i.e on the back end, go to Extensions, select plugin manager, check out k2 system plugin and ensure it is enabled).
Ensure that you setup correctly the jQuery handling options under K2 parameters. All you need to do is go to admin back end, click under components, go to K2 component. Once it is, click on k2 parameters. Check under 'layout & views'. Check jQuery library handling; set it to load v.1.8.2 local; also do the same under Backend jQuery & jQuery UI handling; set it to local copy.
Ensure your k2 comments are enabled and alas, everything will work.
If the above fails - I am dead sure it won't - do the following:
Make sure that there is no other javascript error on your page preventing reCAPTCHA from operating. Have in mind that you only need one copy of jQuery on your site. K2 namespaces jQuery with $K2.
Instead of the following:
$(document).ready ....
You can use the following:
$K2(document).ready ....

Make sure you have setup public and private key under k2 configuration into advance tab. Otherwise your captcha will not show.

Related

Trying to upgrade recaptch from v1 to v2 on Joomla 2.5 site

I've inherited maintenance for a club site which uses reCaptcha v1 on a Joomal 2.5 (I'm also trying to upgrade to Joomla 3.x, but that is a separate issue). I'm very mucha a Joomla newbie, so be gentle.
I got an email stating
You are receiving this email because you are registered as a website administrator using reCAPTCHA, and your website is still using reCAPTCHA v1, which will be turned off on March 31, 2018.
I clicked the Developer guide in the link, and applied and received new keys. I have installed them into a subdomain test site. Before I overwrote the old keys, the captcha was working correctly. Now it is not, displaying only *captcha.
The google instructions also tell me to perform the following:
Paste this snippet before the closing tag on your HTML template:
<script src='https://www.google.com/recaptcha/api.js'></script>
Paste this snippet at the end of the where you want the reCAPTCHA widget to appear:
<div class="g-recaptcha" data-sitekey="6LdFhzUUAAAAAPmsD-junpPMr7AUh_TbI-lmx4PX"></div>}
I do not have a file called template.html and I am uncertain what "form" it is that I should paste the 2nd snippet.
Kindly help!
If you still haven't found a solution, I suggest that you try a fix/patch I prepared for a couple clients of mine that had the same issue. Basically, I have modified the code of the standard captcha/recaptcha plugin so it can support reCAPTCHA v2 keys (by default Joomla 2.5 supports only v1). I have also written down detailed instructions on how to call this plugin from 3rd party extensions, which may be necessary if you have at least one component that's calling the default captcha plugin. Here is the URL:
http://www.tabulizer.com/index.php/support-menu/tabulizer-tips/161-how-to-enable-recaptcha-v2-in-joomla-2-5
Disclaimer: I'm the author of this fix and I wrote it because I could not find a working solution elsewhere.
I have 2 suggestions of where to start.
Recent versions of Joomla have built-in support for reCaptcha. You enable it from System > Global Configuration > Site Settings > Default Captcha.
Settings and your keys are then configured in Extensions > Plugins > Captcha - ReCaptcha, and remember to enable the plugin when you are finished.
It's also possible that the reCaptcha on your site might be coming from a form extension. If the above doesn't solve your problem, what form extension are you using?

Sitecore freezes when trying to define WFFM (Web Forms For Marketers) restricted placeholders

I have the latest version of WFMM (Web Forms For Marketers) for Sitecore. When I try to define the restricted placeholders from Desktop -> All Applications -> Web Forms for Maketers -> Restricted Placeholders everything freezes, including IIS.
I have no errors in the browser console or Sitecore's log.txt.
I has same issue with Sitecore 8.0 rev. 150621 (Update-4) and Web Forms for Marketers 8.0 rev. 150625. Sitecore Support helped me:
The //*[contains(#Allowed Controls, '{0}')] query runs on all items from the database. We apologize for any inconvenience this issue may have caused.
I changed the query to search items only under the root item: .//*[contains(#Allowed Controls, '{0}')]
Could you please follow the steps below to address the issue:
Copy the attached Sitecore.Support.406505.dll assembly to /bin folder.
Change the implementation class for forms:selectplaceholders command in forms.config file:
from
<command name="forms:selectplaceholders" type="Sitecore.Forms.Core.Commands.RestrinctingPlaceholders,Sitecore.Forms.Core" />
to
<command name="forms:selectplaceholders" type="Sitecore.Support.Forms.Core.Commands.RestrinctingPlaceholders,Sitecore.Support.406505" />
Here is the linked to the mentioned dll: Sitecore.Support.406505.dll
Restricting Placeholder dialog is an quick way to add WFFM sublayout form and view form to Allowed Controls field in placeholder settings. Selection of placeholders is maintained on last step of installation of module. Everything is already installed, you just need to follow manual poststeps(attach DB, etc). You can continue without solving this problem.
And if you don't have a huge amount of placeholders then it is quicker to do it using Allowed Controls field rather than trying to find root of the problem.

Sitecore menu items not working - javascript errors

So I'm just starting to work in sitecore and for some reason none of menu options are working in Page Editor mode for the site that I'm working on. We pretty much have the sitecore website and add some extra page content (MVC app files) to it. I'm getting a variety of javascript errors.
In content Editor, if I click the Sitecore logo and click on Properties I get
TypeError: contentIframe.dialog is not a function
In page editor if I click on the blue components button I get:
TypeError: i.widget is not a function
I'm guessing maybe it's a conflict between jquery that we're using for this website and whatever Sitecore is using. I think it's 7 - but I can't see it via the menu option :)
That guess could be wrong - it could in fact be a browser issue, but I've ensured Firefox is not blocking popups. It doesn't work in Firefox, IE or Chrome though.
The weird thing is that no one else on the project is having this issue it's only on my computer.
Edit - I've also just tried re-installing (7.2) without any local code changes I still can't click on a page and go to Presentation, Details (Layout) - I get a TypeError: contentIframe.dialog is not a function
Edit 2 - I've noticed that I can use sitecore in the QA environment and the dialogs work fine there. So it's something specific to my local build of the site we have (sitting on top of sitecore). But the dialogs just throw jquery errors when I do stuff locally. I was hoping it would be a browser setting but doesn't look like it.
Edit 3 - What I've tried this morning.
Same thing happens in all browsers (FF, IE, Chrome) and I’ve cleared
my browser cache I can access the QA site and the dialog appears as
expected
Copied across the QA site files, pointed my local Digital
site in IIS to the new folder – dialogs don’t work
Team member tried accessing the site from his machine (pointing to my IP address) and
dialogs work for him
I tried seeing if another local sitecore site dialogs were working – but the menu items for that are opening as new windows (so I’m guessing it’s a sitecore 7.2 feature that they appear as jquery dialogs??)
So after googling for rejected-by-urlscan it turns out there's a program called UrlScan from microsoft that was blocking my dialogs. Uninstalled that and I now have dialogs appearing for sitecore. Very exciting :)
I guess it is a problem with some browsers plugin. Sitecore is sensitive to scripts that are used(different versions of jquery or prototype.js). Plugins can inject scripts to HTML source of pages and it can cause errors.
Try to switch off all plugins at least at one browser and check the results.

Sitecore - Handle 500 errors separately per site in multisite setup

We're running Sitecore in a multi-site configuration and currently have custom 404 pages for each of our sites.
What we would also like is to have custom 500 pages for each site. I haven't found much on how that works (if it does) in Sitecore, and was hoping the community had some insight into how to set up custom 500 pages in a multi-site Sitecore setup. Currently, we have one 500 page the two sites share. This is fine in development, but in production we don't want to expose the fact that these sites share the same box.
Well as per my knowledge, what you can do is you can directly set a URL to be executed (.i.e. it goes to your common Custom Error Page), where you decide the site-specific error details to be shown.
Considering that you are using IIS 7.0 or 7.5, please follow the steps as below:
Open IIS Manager
Go to your Site, in the Sites Section.
Click on Error Pages in the IIS Section.
Next, you will move to the Error pages set by IIS. Go to Error code 500, select it and click on Edit in Actions Pane.
Now select the option of Execute a URL and select a common page, say /sitecore/MyErrorPage/500ErrorPage.aspx and then, handle site-specific error messages in that particular page.
Hope this Helps!
Regards,
Varun Shringarpure
A 500 error is a server error so Sitecore can't process it. It should be a generic flat HTML file configured is IIS or the web.config
You can override the processor "Sitecore.Pipelines.HttpRequest.ExecuteRequest, Sitecore.Kernel" to handle Sitecore error like item not found, layout not found etc. See more details here: http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/04/Handling-Errors-in-the-Sitecore-ASPNET-CMS.aspx
But when handling 500 errors you should do it outside of Sitecore, think about what happens if you serve your 500 error page in Sitecore but Sitecore is down due to for example sql connection issues or timeouts? Your users will end I a redirect loop.
Take a look at the Error Module on the marketplace. I think it will give you want you want.

Can't Open Web forms for marketers Form Designer or Security Manager

I have had WFFM running on a Sitecore instance for a while, but it has recently stopped working. When I go to "Form Designer" on an existing form, I get the standard Sitecore "The requested document was not found" page.
Requested URL: /applications/modules/web
User Name: sitecore\admin
Site Name: shell
If the page you are trying to display exists, please check that an
appropriate prefix has been added to the IgnoreUrlPrefixes setting in
the web.config.
Note that the requested URL is stated as /applications/modules/web instead of /applications/modules/web forms for marketers.
A lot of development has occurred on this site recently, so I'm not sure when exactly this started happening.
Additional: info:
Folder and file permissions are correct.
I've tried reinstalling the WFFM package, and made sure that all the files are in place.
Several processors have been added to the HttpBeginRequest pipeline, but I removed them all to test if they were the cause - they weren't.
I haven't upgraded Sitecore since WFFM was working and the version is correct.
No errors are logged
EDIT
This also seems to be affecting the Sitecore Security Editor:
Requested URL: /appl
User Name: sitecore\admin
Site Name: shell
If the page you are trying to display exists, please check that an
appropriate prefix has been added to the IgnoreUrlPrefixes setting in
the web.config.
EDIT 2
Further investigation with this is making me think it is related to the Requested URL. I originally thought the the "Not found" page was displaying the requested url incorrectly. However, if I attempt to goto mysite.com/sitecore/shell/applications/fake folder with spaces/fake page with spaces I get this error message:
Requested URL: /applications/fake folder with spaces/fake page with
spaces
User Name: sitecore\admin
Site Name: shell
If the page you are trying to display exists, please check that an
appropriate prefix has been added to the IgnoreUrlPrefixes setting in
the web.config.
As you can see the Requested Url is correct in the error message. So in relation to my problem, I think maybe Sitecore is requesting the wrong URL in the first place.
Additionally if I go to the go the following url by typing directly into the browser, then the Security Editor opens as expected:
mysite.com/sitecore/shell/Applications/Security/User-Editor
This is quite old now but I thought I'd provide an update for anyone else who encounters the problem.
Unfortunately, Sitecore support weren't able to help beyond pointing out that setting the addAspxExtension attribute to 'true' in the link provider seemed to solve the problem. This may have been acceptable except that extensionless URLs were important to the customer.
In the end I had to amend my link provider so that addAspxExtension is set to 'true' in the web config, and then I set it to false inside the GetItemUrl method for specified sites only.
So now whenever the context site is 'Shell' or 'Admin' etc, the extensions are added by default, but switched off in my main website.
Of course, this is a work around. I still don't know how to actually fix the problem
So the first thing that I am going to tell you is that I suspect that there is something wrong with your site declaration for Sitecore Modules. In your web.config, there's a site declaration for "modules_shell" and "modules_website". Those are where the code files that run the modules are usually located... a shell folder to run the parts that run in the Sitecore shell and a web folder to run the part that is accessed by the externally facing site. Please check your site declarations (and the form.config file) to make sure that you're not in live mode or something like that. I would definitely say that this is where you should start looking.
The next thing is to say that your comments about Sitecore not serving a url in the /sitecore/shell directory is really not surprising. Sitecore processes all requests unless you specifically tell it to ignore requests (like setting it in the IgnoreUrlPrefixes in web.config), it's going to try processing it. Like going to /sitecore/shell/applications gives me a layout error because it doesn't have anything set to handle that request. Now your error suggests that there is something wrong with Site declarations.. however, even if they were all right, it still wouldn't work.