magento2.3 – Custom Link with Product edit form

I am using magento 2.3 version. I want to add anchor tag after product attribute Name. I tried with adminhtml_catalog_product_edit_prepare_form observer but not working.

I also tried with JS but not able to add <a class= “product-fuc allow_personalization” href=”#” onclick= “sendapproval(this)”> Need Apprvoal after product name.

Please help me

plugins – publish_{$post_type} hook works only for posts and not for custom post types or pages

I’m trying to send push notification when any of posts, custom post types or pages is published. I’m getting enabled post types from the plugin settings and adding action via foreach loop in my class __construct method. The problem is that it only works for posts and not for any of custom post types or pages. Here is my function and action:

foreach ((array)get_option('PushPostTypes') as $postType) {
    add_action("publish_{$postType}",  array($this, 'doNewPostPush'), 10, 2);

public function doNewPostPush($id, $post) {
    $pushData = array(
        'title' => $post->post_title,
        'body' => strip_tags($post->post_content),
        'data' => array(
            'url' => trailingslashit(get_permalink($id)),

    if (has_post_thumbnail($id)) {
        $pushData('image') = get_the_post_thumbnail_url($id);

get_option('PushPostTypes') is an array of post types that user choose, for example: array('post', 'page', 'custom_post');

Any idea why it only works for post and not for pages or custom post types?

sharepoint online – SPFx define custom config folder for building solution

Is it possible, to somehow define which config folder gulp will take while bundling. Saying i will have a build script for each sppkg solutions

gulp clean && gulp bundle --ship && gulp package-solution --ship --cfg-webpart-one

and gulp then knows that he take config-webpart-one folder which contain package-solution.json and config.json, configured for webpart-one bundle.

Default folder structure is:


With multiple configs will be


I appreciate any help. Thank you!

8 – How to call preprocess functions from my custom module

I have created a custom module that declares a custom image formatter. Now I need to call the Core image module preprocess function ‘template_preprocess_image_formatter’. How would I do that?

I tried to add it in the list of preprocess functions of my custom theme but it doesn’t fire unless I clear the cache:

  * Implements hook_theme().
 function foo_theme() {
    'image_formatter_foo' => (
          'variables' => ('item' => NULL, 'item_attributes' => NULL, 'image_style' => NULL),
          'file' => '',
          'preprocess functions' => (

LInksys WRT3200ACM with OpenWrt – How to install DD-WRT, or at least reset OpenWRT to erase all custom configuration options?

Only option I see is in System / Backup/Flash Firmware at the bottom under the heading “Flash new firmware image”, but that choice states it has to be a “sysugrade-compatible image”.

The only current stuff I was able to find on the DD-WRT ftp is the betas here, but ‘factory-to-ddwrt.bin’ does not sound like it’s ‘sysupgrade-compatible’, and the ‘webflash’ image does not sound right either, and I definitely would like to not brick the router.

I would even be happy to get back to the factory ROM, which I downloaded also, but the problem remains that OpenWRT does not seem to provide a web interface to load a complete ROM, only upgrades to itself, and if I ssh into the router I can only find instructions on how to upgrade OpenWRT, and even those don’t work because as soon as I run the sysupgrade command the shell disconnects and seems to preserve all the unwanted OpenWRT settings.

So any clue as to how to clean up that configuration, and hopefully get DD-WRT installed on this router, would be appreciated.

Custom Contourlabel to show linear values on log plot

How can we use ContourLabels to show linear values of a function on the contour plot while the plot itself is in log scale?

how to access webform submission data from a custom content type

I ‘d be grateful if someone could help with this..

I have a webform, let’s call it input form, which, when submitted, triggers an external application to run on my server. That application uses some of the submission data (reading from webform_submission_data table) and after some time produces an output in the form of XML.

Now, through the use of feeds module, I read that XML data and produce a node, of a certain content type, let’s call it results CT ..

I have a twig template for the results content type, and output is nicely presented to the user.

So far, so good.

Now my problem is this. I need to show both input and output in the same results page.

I tried to use Webform Content Creator module and indeed I have nodes with submission data – let’s call this input data CT.

However, at the time of input form submission, I don’t have the results yet. And I want to link the two together, obviously upon the creation of the results node.

I tried to reference each content type, using Corresponding Entity References so that when a results node is created (automatically through feeds) it would link to the corresponding input data CT. I thought that if I can achieve that connection, then I would be able to access the ‘input’ data through the results page template.

However, I can’t make this connection to work – the ‘entity reference’ field that I use on the results CT, wants an ‘entity ID’ – and I can’t find that. Remember that nodes are created automatically, I don’t have a user creating nodes via a select form or autocomplete text field.

I am trying to figure out how to do this through the sid (submission id) which seems to be a unique key for every submission, and I have this on both my content types .. So ideally I would like to use the sid that I have on my results template, and use that to get the submission data I need.

(obviously) I am not very familiar with the drupal API – I am however comfortable with twig .. I don’t know if (and how) I could pass that information through a pre-process function to be available in the results template.. Is there a simpler way to do it?

Could I link two content types based on a custom field (say a unique number, like sid ??).

Ideally, in a few words, what I want is this:

I have a CT (results) with various fields, one of which is sid. That sid corresponds to a (unique) submission id. How can I access data relevant to that submission id from within the results twig template? So I can then present both input (submission data) and output (results) in the same page.

PS – Perhaps one solution would be to refactor the whole logic, and use one CT for both input/output. Insert some data upon form submission, and then, when results are ready, edit (i.e. fill-in) the rest of the ‘output’ fields via feeds. Then all data are in one CT. However I would rather avoid this as it’s quite a big change .. Shamefully enough, I might just re-enter input data through the XML again – it wouldn’t be a problem – but it’s a really crap solution ..

I ‘d be really grateful if someone could help .. I hope I explained the whole situation adequately enough ..

magento2 – Magetno 2 product collection filter with custom attributes with like

I am using magento 2.3.3 i have custom module in that i am using search when any one search i am filter products name like it is working fine but now i want add extra attributes.I have created product attribute product_title as text field not required.

I have created 2 products

one name=>test.

second one is name=>text ,product_title=>7986

when customer search test key work no results found.

$collection = $this->_productCollection
                     ->addFieldToFilter('name', ('like' => '%'.$queryString.'%'));

if i use above code with name filter it showing result

$collection = $this->_productCollection
                                    //->addFieldToFilter('name', ('like' => '%'.$queryString.'%'))
                                            array('attribute' => 'name', 'like', '%' . $queryString . '%'),
                                            array('attribute' => 'oem_no','like', '%' . $queryString . '%')

if i use both filter no result 0 records.

My requirement i need to search search key word with both attributes if match keyword name or product_title need get that result

 SELECT `e`.*,`v`.`entity_id`,`v`.`attribute_id`,`v`.`value` FROM `catalog_product_entity` AS `e` JOIN `catalog_product_entity_varchar` as `v` on `v`.`entity_id` = `e`.`entity_id` WHERE `v`.`attribute_id` IN (70,195) AND `value` LIKE '%test%'

this raw query getting result in phpmyadmin same like this need result

can any one give solution how to get result

visual studio – Custom list definition solution migrated and not rendering the Sharepoint:Formfield controls

Good evening,

I have a NewForm.aspx and EditForm.aspx from a custom list defined by a WSP where the SharePoint:FormField controls stop to render after the page is loaded for the first time after deployed (not upgraded).

I already tried to change the assembly version of the Registers and even the SharePoint Product Version of the pacakge file from 14 to 19. But when I do that, SharePoint is not finding anymore the custom forms. It only finds if I keep the SharePoint Product Version to 14.

Does someone went through a situation similar to this too?

forms – How to load custom menu field when editing?

I’m extremely new to Drupal so if my question is badly worded I’m sorry. Inside my menu_ui_override.module I have made a made a new field and added a custom submit handler:

function menu_ui_override_form_menu_edit_form_alter(&$form, DrupalCoreFormFormStateInterface $form_state, $form_id) {
  $form('menu_header') = array(
    '#type' => 'textfield',
    '#title' => t('Menu header'),
    '#weight' => '0',
    '#required' => FALSE,

  $form('actions')('submit')('#submit')() = 'menu_ui_override_accept_menu_header_submit';

function menu_ui_override_accept_menu_header_submit(&$form, DrupalCoreFormFormStateInterface $form_state) {
  $values = array(
        'menu_header' => $form_state->getValue('menu_header'),
  $connection = Drupal::database();

    'menu_header' => $values('menu_header'),

This seems to save my new field but now I’m not sure how to load the data entered into that field when I go back to edit the menu after saving it. I’m also not sure where to put the logic for this part. Any help would be greatly appreciated!