Can’t save value in custom field /admin/catalog/category

I have added a custom field in admin category. I need to save and get value of my field using observer.

My Xml file is “category_form.xml”

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"       xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">      <fieldset name="display">          <argument name="data" xsi:type="array">                      <item name="config" xsi:type="array">                  <item name="label" xsi:type="string" translate="true">Custom Field</item>                  <item name="dataScope" xsi:type="string"/>                  <item name="sortOrder" xsi:type="number">10</item>                  <item name="collapsible" xsi:type="boolean">true</item>                  <item name="opened" xsi:type="boolean">true</item>              </item>          </argument>          <field name="display">             <argument name="data" xsi:type="array">                 <item name="options" xsi:type="object">Vendor\Module\Model\Config\Source\Display</item>                 <item name="config" xsi:type="array">                     <item name="dataType" xsi:type="string">select</item>                     <item name="label" translate="true" xsi:type="string">Custom</item>                     <item name="formElement" xsi:type="string">select</item>                 </item>             </argument>         </field>      </fieldset> </form> 

Magento 2 create admin config table with custom rows and columns

I want to create admin config with a table to take the data and save in config for that I followed this link.

But I also want to create custom rows in that table programmatically and also without the last action column and add button. Please refer the image Admin Config

I was unable to find any solution on the web regarding the same nor the file

\Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray

that we extend gave any clues.
Could have easily done this via jquery but want to implement the standard solution.

Code:

<?php namespace Abc\Paymentmethod\Block\Adminhtml\System\Config\Form\Field;  class Feetable extends \Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray {     /**      * @var \Magento\Framework\Data\Form\Element\Factory      */     protected $  _elementFactory;      /**      * @param \Magento\Backend\Block\Template\Context $  context      * @param \Magento\Framework\Data\Form\Element\Factory $  elementFactory      * @param array $  data      */     public function __construct(         \Magento\Backend\Block\Template\Context $  context,         \Magento\Framework\Data\Form\Element\Factory $  elementFactory,         array $  data = []     )     {         $  this->_elementFactory  = $  elementFactory;         parent::__construct($  context,$  data);     }     protected function _construct(){         $  this->addColumn('noi', ['label' => __('NOI'),'readonly'=>'readonly']);         $  this->addColumn('fixed', ['label' => __('Fixed')]);         $  this->addColumn('percent', ['label' => __('Percent')]);         $  this->_addAfter = false;         $  this->_addButtonLabel = __('Add More');         parent::_construct();     }      protected function _prepareArrayRow(\Magento\Framework\DataObject $  row) {         $  options = [1,2,3];         $  row->setData('option_extra_attrs', $  options);     }  } 

system.xml

<field id="abc_fee_table" translate="label comment tooltip" sortOrder="17.4" showInDefault="1" showInWebsite="1" showInStore="0">                     <label>Abc Fee by Number of Installments(NOI)</label>                     <frontend_model>Abc\Paymentmethod\Block\Adminhtml\System\Config\Form\Field\Feetable</frontend_model>                     <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>                                     </field> 

Problem adding button to custom content type form

I am trying to add a cancel button to a custom content type form (typename/type/add). I have looked around and there seems to be two main ways of doing this:

  1. Creating a template file with the name page–node–add–typename.tpl
  2. Implementing the hook_form_alter either in the theme template.tpl.php or in a custom module.

then adding code like

$  form['actions']['cancel'] = array(     '#type'   => 'submit',     '#value'  => t('Cancel'),     '#access' => TRUE,     '#weight' => 55,     '#submit' => array('cancel_button_form_cancel', 'node_form_submit_build_node'),     '#limit_validation_errors' => array(), ); 

In the first case, after rendering the form with drupal_render($ form) the button is added but only the form is rendered. Main menu and other blocks are not rendered.

However in the second case the button never appears. Even though something like drupal_set_title('Title') does change the title.

Any solution to either issue would be most welcome.

Edit The first part of this question is now a separate one here.

export to excel 2016 from sharepoint 2013 custom list in windows 10 using IE 11

I have windows 10 os on my machine and I am trying to export sharepoint 2013 custom list in excel 2016 using IE 11 but it shows me below error:

“cannot connect to the server at this time.Changes to your data cannot be saved”

Can any one suggest me which actions should I take to resolve this.

Magento 2: Get value of custom attributes in cart for configurable product

I have a custom attribute called nb_pieces and i want to display it in the cart i can see the value for simple product and not for a child of configurable product any one explain to me please and how to fix that ?

The value 10 is for nb_pieces for chidl of configurable product added in the page product of the child but when i add in cart a child of configurable product from the page product of configurable product after selection options i can’t recuperate the nb_pieces of this child enter image description here

Custom router gives me “Front controller reached 100 router match iterations” when matches 404

I created a custom router

this is my di.xml

<?xml version="1.0" encoding="UTF-8"?> <!-- /**  * Copyright © 2016 Magento. All rights reserved.  * See COPYING.txt for license details.  */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">     <type name="Magento\Framework\App\RouterList">         <arguments>             <argument name="routerList" xsi:type="array">                 <item name="default" xsi:type="array">                     <item name="class" xsi:type="string">Vendor\Custom\Controller\Router</item>                     <item name="disable" xsi:type="boolean">false</item>                     <item name="sortOrder" xsi:type="string">40</item>                 </item>             </argument>         </arguments>     </type> </config> 

This is the block match function:

public function match(\Magento\Framework\App\RequestInterface $  request) {         $  identifier = trim($  request->getPathInfo(), '/');          if(strpos($  identifier, 'search') !== false) {              $  request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');         } else {             //There is no match             return;         }          /*          * We have match and now we will forward action          */         return $  this->actionFactory->create(                         'Magento\Framework\App\Action\Forward', ['request' => $  request]         );     } 

Everything is fine till I got an error “Front controller reached 100 router match iterations” everytime I go to a 404 page.

Custom router gives me “Front controller reached 100 router match iterations” when matches 404

I created a custom router

this is my di.xml

<?xml version="1.0" encoding="UTF-8"?> <!-- /**  * Copyright © 2016 Magento. All rights reserved.  * See COPYING.txt for license details.  */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">     <type name="Magento\Framework\App\RouterList">         <arguments>             <argument name="routerList" xsi:type="array">                 <item name="default" xsi:type="array">                     <item name="class" xsi:type="string">Vendor\Custom\Controller\Router</item>                     <item name="disable" xsi:type="boolean">false</item>                     <item name="sortOrder" xsi:type="string">40</item>                 </item>             </argument>         </arguments>     </type> </config> 

This is the block match function:

public function match(\Magento\Framework\App\RequestInterface $  request) {         $  identifier = trim($  request->getPathInfo(), '/');          if(strpos($  identifier, 'search') !== false) {              $  request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');         } else {             //There is no match             return;         }          /*          * We have match and now we will forward action          */         return $  this->actionFactory->create(                         'Magento\Framework\App\Action\Forward', ['request' => $  request]         );     } 

Everything is fine till I got an error “Front controller reached 100 router match iterations” everytime I go to a 404 page.

using a custom array adapter [on hold]

I make a todo app and try to put item from textview to listview with my custom adapter. I only get an error in my log no code errors

java.lang.ClassCastException: com.izildo.android.todoapp.MainActivity$ 1 cannot be cast to android.content.Context at com.izildo.android.todoapp.ItemAdapter.(ItemAdapter.java:24) at com.izildo.android.todoapp.MainActivity$ 1.onClick(MainActivity.java:45)

this are the two places where I get a error from in the log

temAdd.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             itemsList.add(new Items(itemT));              itemAdapter = new ItemAdapter(this, itemsList);             listView.setAdapter(itemAdapter);              showToast("oke");         }     });   public ItemAdapter(@NonNull View.OnClickListener context, @SuppressLint("SupportAnnotationUsage") @LayoutRes ArrayList<Items> list){     super((Context) context, 0, list);     mContext = (Context) context;     itemsList = list; } 

I think it has something to do with this object I make.

 itemText = findViewById(R.id.item_text);     final String itemT = itemText.getText().toString();