Category: PHP

Magento2 – Invalid template file issue

If you have installed a fresh copy of Magento2 or upgrading Magento2 from 2.2.5 to 2.2.6 or higher, you may see below issue: 1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: ‘Magento_Backend::page/js/require_js.phtml’ in module: ‘Magento_Backend’ block’s name: ‘require.js’Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: ‘Magento_Backend::page/js/require_js.phtml’ in module: ‘Magento_Backend’ block’s name: ‘require.js’ 0 /vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView(false) 1 /vendor/magento/framework/View/Element/AbstractBlock.php(667): […]

CI3 – New layout using bootstrap RWD framework

Twitter bootstrap is the most popular responsive web design (RWD) framework today. This tutorial will be divided into 2 parts as below: Integrate codeigniter with twitter bootstrap responsive web design(RWD) framework. Create a new common layout and use in the view files. Both of these steps are independent of each other and can be implemented […]

Submit codeigniter form using jQuery AJAX

Codeigniter provides a form helper library which is excellent for handling forms and validations, but when it comes to handling forms using jQuery ajax, there is no native support. However, you can use $this->input->is_ajax_request() to detect if the submitted request is AJAX. As part of this tutorial, below are the main points we will be covering: […]

Enable Cross-site request forgery (CSRF) Protection on codeigniter

What is CSRF Cross-site request forgery or CSRF is a type of security vulnerability which can potentially allow an unauthorized user to perform malicious activity on a website/ web application as an authorized user. It usually tricks the authorized users to perform malicious activity on a website which could be changing a password or transferring […]

Display Google Recaptcha on Codeigniter website with 6 Lines of new code

Google Recaptcha is one of the most effective ways of fighting automated spam today. Below we will see how we can integrate google recaptcha  on a codeigniter website in just three steps : Go to https://www.google.com/recaptcha/admin and sign up for reCAPTCHA API keys for your website. The keys automatically work on http://localhost or http://127.0.0.1. There are two reCAPTCHA keys: Site Key […]