so basically on my wordpress site, i link images and i recently changed my image domain name, so i went into phpmyadmin and typed:
UPDATE `wp_postmeta` SET `meta_value` = replace(meta_value, 'old-domain.com', 'new-domain.com')
and my mysql/phpmyadmin, its all updated to the new domain, but on wordpress, the custom field hasnt picked up the new details and is left blank.
this is my array for the custom field:
'title' => 'Embed Image',
'pages' => array( 'post' ),
'tabs' => array(
'input-version' => array(
'label' => 'Input Version',
'icon' => 'dashicons-admin-customizer',
),
'tab_style' => 'default',
'fields' => array(
array(
'id' => 'ab_embedgroup',
'type' => 'group',
'clone' => true,
'sort_clone' => true,
'save_state' => true,
'desc' => '<b style="color:red;">Insert embed code</b>',
'tab' => 'input-version',
'fields' => array(
array(
'name' => 'Host Name',
'id' => 'ab_hostname',
'type' => 'text',
),
array(
'name' => 'IMEmbed',
'id' => 'ab_embed',
'type' => 'textarea',
'sanitize_callback' => 'none',```
cleared cache, restarted VPS, tried it all, just cant understand why it wont pick it up.
am i editing it incorrectly? Cant do it one by one because its a few thousand images.
Related
I want to show a grid or editable table in my tab in the admin section
I managed to do the module and three tabs are been displayed .In one of the tab i want to show a editable grid i.e in the CHECKS tab
As shown in the below image,in the chek tab section i want to show a grid
In the constructor of my admin controller of my module ()
ie in addhealthcheckconfig\controllers\admin\HealthCheckConfigController.php
I am setting the field options to populate the tab ,below is my code:
$this->fields_options = array(
'appearance' => array(
'title' => $this->l('Manage your Health Check '),
'icon' => 'icon-html5',
'tabs' => array(
'TAB1' => $this->l('SUPPORT_GROUPS'),
'TAB2' => $this->l('CHECKS'),
'TAB3' => $this->l('REPORT RECIPIENTS'),
),
'fields' => array(
'SUPPORT_GROUPS' => array(
'title' => $this->l('SUPPORT GROUPS'),
'hint' => $this->l('Manage your Support Groups here'),
'type' => 'fields_list',
'name' => 'PS_LOGO',
'tab' => 'TAB1'
),
'CHECKS' => array(
'title' => $this->l('LIST OF AVAILABLE CHECKS '),
'hint' => $this->l('List of Available checks will be displayed here !!'),
'type' => 'text',
'list' => $this->fields_list = array(
'code' => array(
'title' => $this->l('code'),
'align' => 'text-center',
'remove_onclick' => true,
'search' => false,
),
'description' => array(
'title' => $this->l('description'),
'align' => 'text-center',
'remove_onclick' => true,
'search' => false,
),
'category' => array(
'title' => $this->l('category'),
'align' => 'text-center',
'remove_onclick' => true,
'search' => false,
),
),
'tab' => 'TAB2'
),
'REPORT_RECIPIENTS' => array(
'title' => $this->l('REPORT RECIPIENTS '),
'hint' => $this->l('List of Available checks will be displayed here !!'),
'tab' => 'TAB3'
),
) ));
In the TAB2 Section i am not sure what i need to put in the 'type' section , I tried with list , but yet I can not achieve what I am trying to do , also i am not sure how to assign the $this->fields_list to that type correctly
How to achieve this editable db grid in my tab ?
I have custom grid on my magento admin panel where I want to add product id as a css id to every select box I have tried 'column_css_class' => 'id' but this add class to every select box with id word not its value how can i do this
$this->addColumn('icon',
array(
'header' => 'Icon',
'width' => '100px',
'type' => 'action',
'getter' => 'getId',
'index' => 'stores',
'column_css_class' => 'id',
'actions' => array(
array(
'caption' => 'Enable',
'url' => array(
'base'=>'*/*/enable'
),'field' => 'id'
),
array(
'caption' => 'Disable',
'url' => array(
'base'=>'*/*/disable'
),
'field' => 'id'
)
)
));
If you have a product object says $oProduct,
You can change your code so that instead of
'column_css_class' => 'id'
You would have:
'column_css_class' => $oProduct->getId()
Also using product id is not a good idea, use SKU instead.
I have Magento custom grid that is showing my list of products I want to remove my product when someone click on delete action. I have written my action code that is below but it is not working everytime when I click on delete it shows me 404 page when using url (*/*/delete) and when I changed the url to (*/*/../../admin/catalog_product/delete) it will go to dashboard page but didn't delete my product:
$this->addColumn('action',
array(
'header' => 'Action',
'width' => '100px',
'type' => 'action',
'getter' => 'getId',
'actions' => array(
array(
'url' => array('base'=> '*/*/edit'),
'field' => 'id'
)
)
)
)
Any solution for my this problem will really helpfull for me.
I think problem is on url making,try to make url as follow in actions.
Note : Replace param_id as per your url perameter and module name as per your module name in helper.
'actions' => array(
array(
'caption' => Mage::helper('module_name')->__('Edit'),
'url' => array(
'base'=>'*/*/edit',
'params'=> array('id'=>$this->getRequest()->getParam('param_id'))
),'field' => 'id'
),
array(
'caption' => Mage::helper('module_name')->__('Delete'),
'url' => array(
'base'=>'*/*/delete',
'params'=> array('id'=>$this->getRequest()->getParam('param_id'))
),'field' => 'id'
)
),
You haven't created a delete action, try modify the above code to:
$this->addColumn('action',
array(
'header' => 'Action',
'width' => '100px',
'type' => 'action',
'getter' => 'getId',
'actions' => array(
array(
'url' => array('base'=> '*/*/edit'),
'field' => 'id'
),
array(
'url' => array('base'=> '*/*/delete'),
'field' => 'id'
)
)
i'm using PHP Yii framework, and came across a problem regarding adding Id and other attributes to a tab. I'm using yii bootstrap by the way as extension:
$tabs = array(
'item1' => array(
'label' => 'label1',
'content' => $content1,
),
'preview' => array(
'label' => 'Preview',
),
);
$this->widget('bootstrap.widgets.TbWizard',
array(
'id' => 'harvest-tabs',
'type' => 'tabs',
'tabs' => $tabs,
'pagerContent' => false,
));
How do i add an 'id' and 'class' property to each of the tab 'item1' and 'preview'?
i tried:
'item1' => array(
'label' => 'label1',
'content' => $content1,
'id' => 'some id'
'class' => 'some class'
),
'preview' => array(
'label' => 'Preview',
'id' => 'some other id'
'class' => 'some other class'
),
But this doesn't add a class to it. I only see <li>'s
that serves as the container for the tabs. Sorry i'm a newbie here. I'd appreciate any help Thanks!
You should try this:
'item1' => array(
'label' => 'label1',
'content' => $content1,
'htmlOptions'=>array(
'id' => 'some id'
'class' => 'some class'
),
),
I haven't tried it but I'm following yii bootstrap logic here. Tell me if it's not working.
I use a frontend plugin to insert data into the database. Via Typo3 (TCA) the record can be viewed in Backend.
The problem:
If there are breaks in the textarea from the frontend form its displayed inside the record like this:
test\r\ntest\r\ntest
What i already tried are different kind of escaping, nl2br, explodes, and so on.
How does the database-field should look like, so the breaks are displayed well?
Here is some code:
'note' => array(
'exclude' => 0,
'label' => 'LLL:EXT:mq_eventform/locallang_db.xml:tx_XYZ_data.note',
'config' => array(
'type' => 'text',
'cols' => '30',
'rows' => '5',
)
),
$field_values = array(
'note' => mysql_real_escape_string($_REQUEST['note']),
);
You need to use TCA type 'none' for backend. But this field is not editable.
'note' => array(
'exclude' => 0,
'label' => 'LLL:EXT:mq_eventform/locallang_db.xml:tx_XYZ_data.note',
'config' => array(
'type' => 'none',
'cols' => '30',
'rows' => '5',
'pass_content' => true,
)
),
And you need to use nl2br() function while storing value to database.
$field_values = array(
'note' => nl2br($_REQUEST['note']),
);