Showing posts with label Bug Fix. Show all posts
Showing posts with label Bug Fix. Show all posts

Monday, June 4, 2018

why form is submitting without validating recaptcha


Cant get google recaptcha v2 to prevent form submission.


Step 1 

Put a js function in your form submit to validate the re-captcha:

<form action="/sign-visitors-log/" method="post" id="VisitorsLogForm" onsubmit="return validateRecaptcha();">

Step 2 : Then some js to stop the form submit if the user didn't tick the check box:

function validateRecaptcha() {
    var response = grecaptcha.getResponse();
    if (response.length === 0) {
        alert("not validated");
        return false;
    } else {
        alert("validated");
        return true;
    }
}

Saturday, September 23, 2017

joomla migration - Error: 0 - Using $this when not in object context

The requested page can't be found.

Error: 0 - Using $this when not in object context
Go to the Home Page
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
The requested page can't be found.
Error: 404 - Article not found
Go to the Home Page
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
SOLUTION :
 This id due to Server PHP Version updated to 7.0.6.  Rolled it back to 5.6 to get the Site working again.it can be done via cpanel

alternatively :: inside the root directory there is a folder called libraries/joomla/version.php . delete this file and the upgrade works.

Friday, August 4, 2017

How to add external link to top menu bar in Opencart

[SOLVED] To add external link to top Category menu bar in Opencart 

EDIT header.twig file [ for OpenCart 3.0.2.0 
PATH :> catalog/view/theme/default/template/common/header.twig 

OR

EDIT header.tpl file [ for OpenCart 1.x , 2.x 
PATH :>catalog/view/theme/default/template/common/header.tpl  

IT WORKS BY EDITING FROM ADMIN PANEL ONLY NOT FROM CPANEL.

Find Code: 
  </ul>
</div>
<?php } ?>
<div id="notification"></div>
Add Before </ul> the above Code: 
<li><a href="http://www.google.co.uk">Link Text</a></li>

Sunday, July 23, 2017

How to Enable PDO Extension in Opencart - Solved

[SOLVED] Fatal error: Class 'PDO' not found in /home/avncrowd/public_html/system/library/db/mpdo.php on line 9


On a windows server you can add the following lines in your php.ini
extension=php_pdo.dll
extension=php_pdo_mysql.dll

On a Linux server you can you can add the following lines in your php.ini 
[ compile php with the following option --with-pdo-mysql In your php.ini, add the following lines (optional) ]

extension=pdo.so;
extension=pdo_mysql.so;

OR SIMPLY RENAME THE PHP.INI FILE TO ANY OTHER FILENAME