Ignore posts content in the posts queries for internal linking

I am looking for a filter to ignore searching in posts content from the posts editor which is natively using the link function. https://developer.wordpress.org/reference/classes/_wp_editors/wp_link_query/ Use case: with 300,000 articles, the query is too slow, searching in titles and excerpt is good enough. Internal linking happens in the Classic Editor; example below: Action: /wp-admin/admin-ajax.php Form Data:…

Magento 2 Attempt to load value of nonexistent EAV attribute with CategoryInterface after migration

after 1.x to 2.3 I am getting error as following in my System.log file. [2020-02-06 13:29:01] main.WARNING: Attempt to load value of nonexistent EAV attribute ‘903’ for entity type ‘Magento\Catalog\Api\Data\ProductInterface’. [] [] I searched for the value 903 with queries: SELECT * FROM catalog_category_entity_datetime WHERE attribute_id = 903; SELECT * FROM catalog_category_entity_decimal WHERE attribute_id =…

How to query a custom content entity with fields added with UI?

In a custom module (assoc), I have a custom Content Entity (Person) with some fields: $fields[‘lastname’] = BaseFieldDefinition::create(‘string’) $fields[‘firstname’] = BaseFieldDefinition::create(‘string’) $fields[’email’] = BaseFieldDefinition::create(’email’) $fields[‘cellphone’] = BaseFieldDefinition::create(‘telephone’) I added a field to this entity using the UI: I have a query on this entity: $database = \Drupal::database(); $query = $database->select(‘person’, ‘ap’); $query->fields(‘ap’, [‘id’, ‘lastname’, ‘firstname’])…

How to configure Kernel test in drupal 8 environment?

Current I am able to run the Unit test from the below command C:\Acquia_dev_desktop\LocalInstance\drupal_new_lab\vendor\bin>phpunit -c ../../core/phpunit.xml.dist ../../modules/custom/lse_demo/tests/src/Unit PHPUnit 6.5.0 by Sebastian Bergmann and contributors. …… 6 / 6 (100%) Time: 10.62 seconds, Memory: 6.00MB OK (6 tests, 12 assertions) But When I tried to do the same with Kernel test I get below error C:\Acquia_dev_desktop\LocalInstance\drupal_new_lab\vendor\bin>phpunit…

Unable to override Helper Class in Magento2

I have used below code to override helper class. Vendor/Module/etc/di.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <preference for=”Magento\CatalogInventory\Helper\Stock” type=”Vendor\Module\Helper\Stock” /> </config> Then Vendor\Module\Helper\Stock.php <?php namespace Vendor\Module\Helper; class Stock extends \Magento\CatalogInventory\Helper\Stock { public function addIsInStockFilterToCollection($collection) { $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $category = $objectManager->get(‘Magento\Framework\Registry’) ->registry(‘current_category’);//get current category $categoryId = $category->getId(); $writer = new \Zend\Log\Writer\Stream(BP . ‘/var/log/testlog.log’); $logger = new…

most viewed collection sorting

Hi I have most viewed collection sorting in my plp here is my toolbar.php code if ($subject->getCurrentOrder() == ‘most_viewed’) { if (!$this->_subQueryApplied) { $period = $this->scopeConfig->getValue($this->_configPeriodPath, \Magento\Store\Model\ScopeInterface::SCOPE_STORE); switch ($period) { case “yearly”: $table = “report_viewed_product_aggregated_yearly”; break; case “monthly”: $table = “report_viewed_product_aggregated_monthly”; break; default: $table = “report_viewed_product_aggregated_daily”; break; } $reportTable = $this->_collection->getResource()->getTable($table); $this->_collection->getSelect() ->joinLeft( array(“report_table” =>…