Categories
CMS Drupal Mastering Development

Modulo by zero in Drupal\ip2country\Ip2CountryManager->updateDatabase() (line 218 of modules/ip2country/src/Ip2CountryManager.php) error

After upgrade my Drupal core to 8.9.1 I got an ipcountry error in all my pages: The website encountered an unexpected error. Please try again later. DivisionByZeroError: Modulo by zero in Drupal\ip2country\Ip2CountryManager->updateDatabase() (line 218 of modules/ip2country/src/Ip2CountryManager.php). Drupal\ip2country\Ip2CountryManager->updateDatabase(‘arin’, , NULL) (Line: 65) ip2country_cron() call_user_func_array(‘ip2country_cron’, Array) (Line: 392) Drupal\Core\Extension\ModuleHandler->invoke(‘ip2country’, ‘cron’) (Line: 236) Drupal\Core\Cron->invokeCronHandlers() (Line: 134) Drupal\Core\Cron->run() (Line: […]

Categories
Cryptocurrency Ethereum Mastering Development

When to use “memory” and “storage” keyword in solidity 0.6.0?

From what I’ve learned and noticed. Please add more point and rectify me if I’m wrong. Use of memory keyword 1)When initialising/declaring Struct, Array , and mapping. 2)In the parameters of functions and constructor. With string only. Not with uint or int or address. function verifier (uint age, address add,string memory location) Use of storage […]

Categories
CMS Mastering Development Wordpress

How to load css file in my menu in wordpress

Anyone know how to load css file in my menu in wordpress. use this but it didn’t work function wmt_theme_style() { wp_enqueue_style( ‘bootstrap-styles’, get_template_directory_uri() . ‘/css/bootstrap.css’, array(), ‘3.3.4’, ‘all’ ); } add_action( ‘wp_enqueue_scripts’, ‘wmt_theme_style’ );

Categories
CMS Drupal Mastering Development

Using Azure File Storage Blob with Drupal

I am getting the following error whlie trying to upload a video file through Azure module ( https://www.drupal.org/project/az_blob_fs ) with Drupal Webforms. The files are getting uploaded to the Azure Storage Container successfully, but getting this error when the form is submitted. Can anyone guide me to discover what this error actually is ? Any […]

Categories
CMS Mastering Development Wordpress

wp enqueue style on about us page

On functions.php I have the following which works on the homepage : function load_page_styles() { if (is_front_page()) { wp_register_style(‘home’, get_template_directory_uri() . ‘/css/home.css’, array(), 1, ‘all’); wp_enqueue_style(‘home’); wp_register_style(‘font-awesome’, get_template_directory_uri() . ‘/css/font-awesome.css’, array(), 1, ‘all’); wp_enqueue_style(‘font-awesome’); } else if (is_page( ‘about’)) { wp_register_style(‘about’, get_template_directory_uri() . ‘/css/about.css’, array(), 1, ‘all’); wp_enqueue_style(‘about’); } } add_action( ‘wp_enqueue_scripts’, ‘load_page_styles’ ); It […]

Categories
CMS Mastering Development Wordpress

wp enqueue style on about us page

On functions.php I have the following which works on the homepage : function load_page_styles() { if (is_front_page()) { wp_register_style(‘home’, get_template_directory_uri() . ‘/css/home.css’, array(), 1, ‘all’); wp_enqueue_style(‘home’); wp_register_style(‘font-awesome’, get_template_directory_uri() . ‘/css/font-awesome.css’, array(), 1, ‘all’); wp_enqueue_style(‘font-awesome’); } else if (is_page( ‘about’)) { wp_register_style(‘about’, get_template_directory_uri() . ‘/css/about.css’, array(), 1, ‘all’); wp_enqueue_style(‘about’); } } add_action( ‘wp_enqueue_scripts’, ‘load_page_styles’ ); It […]

Categories
CMS Mastering Development Wordpress

Plugin Error activation

I have a task to create a parser plugin. The task of the parser is that it will load from another website (on the same server where the site is wp ) innerhtml text by className. After parsing data i should create wp post by custom post type and fill ACF( advanced custom field ) […]

Categories
Mastering Development

Losing data from array

I’m slicing 3 elements from an array and storing them to another array array = [1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1]; rows = 3; Here is my method getVertWallStruct = (array, rows) => { let i = 1, storageArr = [], data = […]

Categories
CMS Magento Mastering Development

Magento 2.3: main.ERROR: Unable to resolve the source file issue

I am getting below error when I ran php bin/magento setup:static-content:deploy -f cmd. frontend/Alothemes/digitalstore3/en_US 2494/2645 ==========================>- 94% 5 secs Compilation from source /var/www/mag2/app/design/frontend/Alothemes/digitalstore1/web/images/flags/german.jpg failed Magento\Framework\View\Asset\File\NotFoundException: Unable to resolve the source file for ‘frontend/Alothemes/digitalstore3/en_US/images/flags/german.jpg’ in /var/www/mag2/vendor/magento/framework/View/Asset/File.php:160 Stack trace: #0 /var/www/mag2/vendor/magento/framework/App/View/Asset/Publisher.php(74): Magento\Framework\View\Asset\File->getSourceFile() #1 /var/www/mag2/vendor/magento/framework/App/View/Asset/Publisher.php(62): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File)) #2 /var/www/mag2/vendor/magento/module-deploy/Service/DeployStaticFile.php(89): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File)) #3 /var/www/mag2/vendor/magento/module-deploy/Service/DeployPackage.php(189): Magento\Deploy\Service\DeployStaticFile->deployFile(‘images/flags/ge…’, Array) #4 /var/www/mag2/vendor/magento/module-deploy/Service/DeployPackage.php(133): Magento\Deploy\Service\DeployPackage->processFile(Object(Magento\Deploy\Package\PackageFile), Object(Magento\Deploy\Package\Package)) #5 […]

Categories
CMS Mastering Development Wordpress

Where to find documentation for CPT block template? (PHP)

I have been searching for a day and still carn’t seem to find the right documentation for what arguments I can pass to core components when attempting to configure a CPT block template in php. This is what I have but I want to take this further by nesting buttons and custom html etc. but […]