Magento 2 Uncaught ReferenceError: Base64 is not definedMagento 2 how to create customer file attributeUncaught ReferenceError: signals is not definedUncaught ReferenceError: config is not defined magento 2Magento2: Overwriting block file showing ReferenceError: opConfig is not definedMagento2 : ReferenceError: jQuery is not definedMagento 2.0.17 Category page Error - Uncaught ReferenceError: updateContent is not definedAfter Magento2.2.0 upgrade: ReferenceError: initializeFieldsetDataByDefault is not definedForm is not displayed on panel admin Magento 2when i have add to product error display ReferenceError: Uploader is not defined?ReferenceError: jQuery is not defined Magento 2ReferenceError: jQuery is not defined error owl Carousel slider

Why does the UK have more political parties than the US?

Why did this prime-sequence puzzle not work?

Modern approach to radio buttons

What does uniform continuity mean exactly?

Glitch in AC sine wave interfering with phase cut dimming

What does it mean when you think without speaking?

Is there an explanation for Austria's Freedom Party virtually retaining its vote share despite recent scandal?

Transform the partial differential equation with new independent variables

What does the behaviour of water on the skin of an aircraft in flight tell us?

Why doesn't the Earth's acceleration towards the Moon accumulate to push the Earth off its orbit?

Is there any use case for the bottom type as a function parameter type?

Comment dit-on « I’ll tell you what » ?

What F1 in name of seeds/varieties means?

Can a non-EU citizen travel within schengen zone freely without passport?

Canon 70D often overexposing or underexposing shots

Infinitely many hats

Could I be denied entry into Ireland due to medical and police situations during a previous UK visit?

Yandex Programming Contest: Alarms

What are the benefits of cryosleep?

What caused the tendency for conservatives to not support climate change reform?

Is it possible to change original filename of an exe?

What is the most important source of natural gas? coal, oil or other?

Do firearms count as ranged weapons?

What are the problems in teaching guitar via Skype?



Magento 2 Uncaught ReferenceError: Base64 is not defined


Magento 2 how to create customer file attributeUncaught ReferenceError: signals is not definedUncaught ReferenceError: config is not defined magento 2Magento2: Overwriting block file showing ReferenceError: opConfig is not definedMagento2 : ReferenceError: jQuery is not definedMagento 2.0.17 Category page Error - Uncaught ReferenceError: updateContent is not definedAfter Magento2.2.0 upgrade: ReferenceError: initializeFieldsetDataByDefault is not definedForm is not displayed on panel admin Magento 2when i have add to product error display ReferenceError: Uploader is not defined?ReferenceError: jQuery is not defined Magento 2ReferenceError: jQuery is not defined error owl Carousel slider






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I am making customer file attribute,first time i am getting that error -



Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/xxx/xxx/vendor/magento/framework/File/Uploader.php on line 552



After solve this then i am getting that error in console -



Uncaught ReferenceError: Base64 is not defined



i am using this code -



use MagentoFrameworkSetupUpgradeDataInterface;
use MagentoFrameworkSetupModuleDataSetupInterface;
use MagentoFrameworkSetupModuleContextInterface;
use MagentoCustomerSetupCustomerSetupFactory;
use MagentoCustomerModelCustomer;
use MagentoEavModelEntityAttributeSet as AttributeSet;
use MagentoEavModelEntityAttributeSetFactory as AttributeSetFactory;


class UpgradeData implements UpgradeDataInterface

protected $customerSetupFactory;
private $attributeSetFactory;

public function __construct(
CustomerSetupFactory $customerSetupFactory, AttributeSetFactory $attributeSetFactory
)
$this->customerSetupFactory = $customerSetupFactory;
$this->attributeSetFactory = $attributeSetFactory;



public function upgrade( ModuleDataSetupInterface $setup, ModuleContextInterface $context )

if (version_compare($context->getVersion(), '1.0.4') < 0)

$setup->startSetup();
$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

$customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
$attributeSetId = $customerEntity->getDefaultAttributeSetId();

$attributeSet = $this->attributeSetFactory->create();
$attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

$customerSetup->addAttribute(MagentoCustomerModelCustomer::ENTITY, 'twilio_image', [
'type' => 'text',
'label' => 'Twilio Image',
'input' => 'file',
"source" => '',
'required' => false,
'default' => '0',
'visible' => true,
'user_defined' => true,
'sort_order' => 210,
'position' => 210,
'system' => false,
]);

$image = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'twilio_image')
->addData([
'attribute_set_id' => $attributeSetId,
'attribute_group_id' => $attributeGroupId,
'used_in_forms' => ['adminhtml_customer', 'customer_account_create', 'customer_account_edit'],
]);

$image->save();
$setup->endSetup();





/vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml



<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">design_config_form.design_config_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Theme Information</item>
<item name="template" xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<buttons>
<button name="save_and_continue" class="MagentoThemeBlockAdminhtmlDesignConfigEditSaveAndContinueButton"/>
<button name="save" class="MagentoThemeBlockAdminhtmlDesignConfigEditSaveButton"/>
<button name="back" class="MagentoThemeBlockAdminhtmlDesignConfigEditBackButton"/>
</buttons>
<namespace>design_config_form</namespace>
<dataScope>data</dataScope>
<deps>
<dep>design_config_form.design_config_form_data_source</dep>
</deps>
</settings>
<dataSource name="design_config_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<settings>
<submitUrl path="theme/design_config/save"/>
</settings>
<dataProvider class="MagentoThemeModelDesignConfigDataProvider" name="design_config_form_data_source">
<settings>
<clientConfig>
<param name="validateBeforeSave" xsi:type="boolean">false</param>
</clientConfig>
<requestFieldName>scope</requestFieldName>
<primaryFieldName>scope</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="other_settings" sortOrder="30">
<settings>
<label translate="true">Other Settings</label>
</settings>
<fieldset name="head">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">HTML Head</label>
</settings>
<field name="head_shortcut_icon" formElement="imageUploader">
<settings>
<notice translate="true">Not all browsers support all these formats!</notice>
<label translate="true">Favicon Icon</label>
<componentType>imageUploader</componentType>
</settings>
<formElements>
<imageUploader>
<settings>
<allowedExtensions>jpg jpeg gif png ico apng</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
</uploaderConfig>
</settings>
</imageUploader>
</formElements>
</field>
<field name="head_default_title" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Page Title</label>
<dataScope>head_default_title</dataScope>
</settings>
</field>
<field name="head_title_prefix" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Page Title Prefix</label>
<dataScope>head_title_prefix</dataScope>
</settings>
</field>
<field name="head_title_suffix" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Page Title Suffix</label>
<dataScope>head_title_suffix</dataScope>
</settings>
</field>
<field name="head_default_description" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Meta Description</label>
<dataScope>head_default_description</dataScope>
</settings>
</field>
<field name="head_default_keywords" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Meta Keywords</label>
<dataScope>head_default_keywords</dataScope>
</settings>
</field>
<field name="head_includes" formElement="textarea">
<settings>
<notice translate="true">This will be included before head closing tag in page HTML.</notice>
<dataType>text</dataType>
<label translate="true">Scripts and Style Sheets</label>
<dataScope>head_includes</dataScope>
</settings>
</field>
<field name="head_demonotice" formElement="select">
<settings>
<dataType>text</dataType>
<label translate="true">Display Demo Store Notice</label>
<dataScope>head_demonotice</dataScope>
</settings>
<formElements>
<select>
<settings>
<options class="MagentoConfigModelConfigSourceYesno"/>
</settings>
</select>
</formElements>
</field>
</fieldset>
<fieldset name="header">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">Header</label>
</settings>
<field name="header_logo_src" formElement="imageUploader">
<settings>
<label translate="true">Logo Image</label>
<componentType>imageUploader</componentType>
</settings>
<formElements>
<imageUploader>
<settings>
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
</uploaderConfig>
</settings>
</imageUploader>
</formElements>
</field>
<field name="header_logo_width" formElement="input">
<settings>
<validation>
<rule name="validate-digits" xsi:type="boolean">true</rule>
</validation>
<dataType>number</dataType>
<label translate="true">Logo Attribute Width</label>
<dataScope>header_logo_width</dataScope>
</settings>
</field>
<field name="header_logo_height" formElement="input">
<settings>
<validation>
<rule name="validate-digits" xsi:type="boolean">true</rule>
</validation>
<dataType>number</dataType>
<label translate="true">Logo Attribute Height</label>
<dataScope>header_logo_height</dataScope>
</settings>
</field>
<field name="header_welcome" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Welcome Text</label>
<dataScope>header_welcome</dataScope>
</settings>
</field>
<field name="header_logo_alt" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Logo Image Alt</label>
<dataScope>header_logo_alt</dataScope>
</settings>
</field>
</fieldset>
<fieldset name="footer">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">Footer</label>
</settings>
<field name="footer_absolute_footer" formElement="textarea">
<settings>
<notice translate="true">This will be displayed just before the body closing tag.</notice>
<dataType>text</dataType>
<label translate="true">Miscellaneous HTML</label>
<dataScope>footer_absolute_footer</dataScope>
</settings>
</field>
<field name="footer_copyright" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Copyright</label>
<dataScope>footer_copyright</dataScope>
</settings>
</field>
</fieldset>
<fieldset name="search_engine_robots" sortOrder="120">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label>Search Engine Robots</label>
</settings>
<field name="default_robots" formElement="select">
<settings>
<notice translate="true">This will be included before head closing tag in page HTML.</notice>
<dataType>text</dataType>
<label translate="true">Default Robots</label>
<dataScope>default_robots</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
<formElements>
<select>
<settings>
<options class="MagentoConfigModelConfigSourceDesignRobots"/>
</settings>
</select>
</formElements>
</field>
<field name="custom_instructions" formElement="textarea">
<settings>
<dataType>text</dataType>
<label translate="true">Edit custom instruction of robots.txt File</label>
<dataScope>custom_instructions</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
</field>
<field name="reset_to_defaults" class="MagentoThemeUiComponentDesignConfigSearchRobotsResetButton" component="Magento_Theme/js/form/component/robots-reset-button" template="Magento_Theme/form/button-field" formElement="button">
<settings>
<notice translate="true">This action will delete your custom instructions and reset robots.txt file to system's default settings.</notice>
<dataScope>reset_to_defaults</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
<formElements>
<button>
<settings>
<title translate="true">Reset To Defaults</title>
</settings>
</button>
</formElements>
</field>
</fieldset>
</fieldset>
</form>









share|improve this question
























  • error is from Js not from php

    – magefms
    May 22 at 10:04











  • here both are related

    – sumeet bajaj
    May 22 at 10:05

















2















I am making customer file attribute,first time i am getting that error -



Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/xxx/xxx/vendor/magento/framework/File/Uploader.php on line 552



After solve this then i am getting that error in console -



Uncaught ReferenceError: Base64 is not defined



i am using this code -



use MagentoFrameworkSetupUpgradeDataInterface;
use MagentoFrameworkSetupModuleDataSetupInterface;
use MagentoFrameworkSetupModuleContextInterface;
use MagentoCustomerSetupCustomerSetupFactory;
use MagentoCustomerModelCustomer;
use MagentoEavModelEntityAttributeSet as AttributeSet;
use MagentoEavModelEntityAttributeSetFactory as AttributeSetFactory;


class UpgradeData implements UpgradeDataInterface

protected $customerSetupFactory;
private $attributeSetFactory;

public function __construct(
CustomerSetupFactory $customerSetupFactory, AttributeSetFactory $attributeSetFactory
)
$this->customerSetupFactory = $customerSetupFactory;
$this->attributeSetFactory = $attributeSetFactory;



public function upgrade( ModuleDataSetupInterface $setup, ModuleContextInterface $context )

if (version_compare($context->getVersion(), '1.0.4') < 0)

$setup->startSetup();
$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

$customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
$attributeSetId = $customerEntity->getDefaultAttributeSetId();

$attributeSet = $this->attributeSetFactory->create();
$attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

$customerSetup->addAttribute(MagentoCustomerModelCustomer::ENTITY, 'twilio_image', [
'type' => 'text',
'label' => 'Twilio Image',
'input' => 'file',
"source" => '',
'required' => false,
'default' => '0',
'visible' => true,
'user_defined' => true,
'sort_order' => 210,
'position' => 210,
'system' => false,
]);

$image = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'twilio_image')
->addData([
'attribute_set_id' => $attributeSetId,
'attribute_group_id' => $attributeGroupId,
'used_in_forms' => ['adminhtml_customer', 'customer_account_create', 'customer_account_edit'],
]);

$image->save();
$setup->endSetup();





/vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml



<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">design_config_form.design_config_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Theme Information</item>
<item name="template" xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<buttons>
<button name="save_and_continue" class="MagentoThemeBlockAdminhtmlDesignConfigEditSaveAndContinueButton"/>
<button name="save" class="MagentoThemeBlockAdminhtmlDesignConfigEditSaveButton"/>
<button name="back" class="MagentoThemeBlockAdminhtmlDesignConfigEditBackButton"/>
</buttons>
<namespace>design_config_form</namespace>
<dataScope>data</dataScope>
<deps>
<dep>design_config_form.design_config_form_data_source</dep>
</deps>
</settings>
<dataSource name="design_config_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<settings>
<submitUrl path="theme/design_config/save"/>
</settings>
<dataProvider class="MagentoThemeModelDesignConfigDataProvider" name="design_config_form_data_source">
<settings>
<clientConfig>
<param name="validateBeforeSave" xsi:type="boolean">false</param>
</clientConfig>
<requestFieldName>scope</requestFieldName>
<primaryFieldName>scope</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="other_settings" sortOrder="30">
<settings>
<label translate="true">Other Settings</label>
</settings>
<fieldset name="head">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">HTML Head</label>
</settings>
<field name="head_shortcut_icon" formElement="imageUploader">
<settings>
<notice translate="true">Not all browsers support all these formats!</notice>
<label translate="true">Favicon Icon</label>
<componentType>imageUploader</componentType>
</settings>
<formElements>
<imageUploader>
<settings>
<allowedExtensions>jpg jpeg gif png ico apng</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
</uploaderConfig>
</settings>
</imageUploader>
</formElements>
</field>
<field name="head_default_title" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Page Title</label>
<dataScope>head_default_title</dataScope>
</settings>
</field>
<field name="head_title_prefix" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Page Title Prefix</label>
<dataScope>head_title_prefix</dataScope>
</settings>
</field>
<field name="head_title_suffix" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Page Title Suffix</label>
<dataScope>head_title_suffix</dataScope>
</settings>
</field>
<field name="head_default_description" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Meta Description</label>
<dataScope>head_default_description</dataScope>
</settings>
</field>
<field name="head_default_keywords" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Meta Keywords</label>
<dataScope>head_default_keywords</dataScope>
</settings>
</field>
<field name="head_includes" formElement="textarea">
<settings>
<notice translate="true">This will be included before head closing tag in page HTML.</notice>
<dataType>text</dataType>
<label translate="true">Scripts and Style Sheets</label>
<dataScope>head_includes</dataScope>
</settings>
</field>
<field name="head_demonotice" formElement="select">
<settings>
<dataType>text</dataType>
<label translate="true">Display Demo Store Notice</label>
<dataScope>head_demonotice</dataScope>
</settings>
<formElements>
<select>
<settings>
<options class="MagentoConfigModelConfigSourceYesno"/>
</settings>
</select>
</formElements>
</field>
</fieldset>
<fieldset name="header">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">Header</label>
</settings>
<field name="header_logo_src" formElement="imageUploader">
<settings>
<label translate="true">Logo Image</label>
<componentType>imageUploader</componentType>
</settings>
<formElements>
<imageUploader>
<settings>
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
</uploaderConfig>
</settings>
</imageUploader>
</formElements>
</field>
<field name="header_logo_width" formElement="input">
<settings>
<validation>
<rule name="validate-digits" xsi:type="boolean">true</rule>
</validation>
<dataType>number</dataType>
<label translate="true">Logo Attribute Width</label>
<dataScope>header_logo_width</dataScope>
</settings>
</field>
<field name="header_logo_height" formElement="input">
<settings>
<validation>
<rule name="validate-digits" xsi:type="boolean">true</rule>
</validation>
<dataType>number</dataType>
<label translate="true">Logo Attribute Height</label>
<dataScope>header_logo_height</dataScope>
</settings>
</field>
<field name="header_welcome" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Welcome Text</label>
<dataScope>header_welcome</dataScope>
</settings>
</field>
<field name="header_logo_alt" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Logo Image Alt</label>
<dataScope>header_logo_alt</dataScope>
</settings>
</field>
</fieldset>
<fieldset name="footer">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">Footer</label>
</settings>
<field name="footer_absolute_footer" formElement="textarea">
<settings>
<notice translate="true">This will be displayed just before the body closing tag.</notice>
<dataType>text</dataType>
<label translate="true">Miscellaneous HTML</label>
<dataScope>footer_absolute_footer</dataScope>
</settings>
</field>
<field name="footer_copyright" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Copyright</label>
<dataScope>footer_copyright</dataScope>
</settings>
</field>
</fieldset>
<fieldset name="search_engine_robots" sortOrder="120">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label>Search Engine Robots</label>
</settings>
<field name="default_robots" formElement="select">
<settings>
<notice translate="true">This will be included before head closing tag in page HTML.</notice>
<dataType>text</dataType>
<label translate="true">Default Robots</label>
<dataScope>default_robots</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
<formElements>
<select>
<settings>
<options class="MagentoConfigModelConfigSourceDesignRobots"/>
</settings>
</select>
</formElements>
</field>
<field name="custom_instructions" formElement="textarea">
<settings>
<dataType>text</dataType>
<label translate="true">Edit custom instruction of robots.txt File</label>
<dataScope>custom_instructions</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
</field>
<field name="reset_to_defaults" class="MagentoThemeUiComponentDesignConfigSearchRobotsResetButton" component="Magento_Theme/js/form/component/robots-reset-button" template="Magento_Theme/form/button-field" formElement="button">
<settings>
<notice translate="true">This action will delete your custom instructions and reset robots.txt file to system's default settings.</notice>
<dataScope>reset_to_defaults</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
<formElements>
<button>
<settings>
<title translate="true">Reset To Defaults</title>
</settings>
</button>
</formElements>
</field>
</fieldset>
</fieldset>
</form>









share|improve this question
























  • error is from Js not from php

    – magefms
    May 22 at 10:04











  • here both are related

    – sumeet bajaj
    May 22 at 10:05













2












2








2








I am making customer file attribute,first time i am getting that error -



Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/xxx/xxx/vendor/magento/framework/File/Uploader.php on line 552



After solve this then i am getting that error in console -



Uncaught ReferenceError: Base64 is not defined



i am using this code -



use MagentoFrameworkSetupUpgradeDataInterface;
use MagentoFrameworkSetupModuleDataSetupInterface;
use MagentoFrameworkSetupModuleContextInterface;
use MagentoCustomerSetupCustomerSetupFactory;
use MagentoCustomerModelCustomer;
use MagentoEavModelEntityAttributeSet as AttributeSet;
use MagentoEavModelEntityAttributeSetFactory as AttributeSetFactory;


class UpgradeData implements UpgradeDataInterface

protected $customerSetupFactory;
private $attributeSetFactory;

public function __construct(
CustomerSetupFactory $customerSetupFactory, AttributeSetFactory $attributeSetFactory
)
$this->customerSetupFactory = $customerSetupFactory;
$this->attributeSetFactory = $attributeSetFactory;



public function upgrade( ModuleDataSetupInterface $setup, ModuleContextInterface $context )

if (version_compare($context->getVersion(), '1.0.4') < 0)

$setup->startSetup();
$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

$customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
$attributeSetId = $customerEntity->getDefaultAttributeSetId();

$attributeSet = $this->attributeSetFactory->create();
$attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

$customerSetup->addAttribute(MagentoCustomerModelCustomer::ENTITY, 'twilio_image', [
'type' => 'text',
'label' => 'Twilio Image',
'input' => 'file',
"source" => '',
'required' => false,
'default' => '0',
'visible' => true,
'user_defined' => true,
'sort_order' => 210,
'position' => 210,
'system' => false,
]);

$image = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'twilio_image')
->addData([
'attribute_set_id' => $attributeSetId,
'attribute_group_id' => $attributeGroupId,
'used_in_forms' => ['adminhtml_customer', 'customer_account_create', 'customer_account_edit'],
]);

$image->save();
$setup->endSetup();





/vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml



<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">design_config_form.design_config_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Theme Information</item>
<item name="template" xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<buttons>
<button name="save_and_continue" class="MagentoThemeBlockAdminhtmlDesignConfigEditSaveAndContinueButton"/>
<button name="save" class="MagentoThemeBlockAdminhtmlDesignConfigEditSaveButton"/>
<button name="back" class="MagentoThemeBlockAdminhtmlDesignConfigEditBackButton"/>
</buttons>
<namespace>design_config_form</namespace>
<dataScope>data</dataScope>
<deps>
<dep>design_config_form.design_config_form_data_source</dep>
</deps>
</settings>
<dataSource name="design_config_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<settings>
<submitUrl path="theme/design_config/save"/>
</settings>
<dataProvider class="MagentoThemeModelDesignConfigDataProvider" name="design_config_form_data_source">
<settings>
<clientConfig>
<param name="validateBeforeSave" xsi:type="boolean">false</param>
</clientConfig>
<requestFieldName>scope</requestFieldName>
<primaryFieldName>scope</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="other_settings" sortOrder="30">
<settings>
<label translate="true">Other Settings</label>
</settings>
<fieldset name="head">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">HTML Head</label>
</settings>
<field name="head_shortcut_icon" formElement="imageUploader">
<settings>
<notice translate="true">Not all browsers support all these formats!</notice>
<label translate="true">Favicon Icon</label>
<componentType>imageUploader</componentType>
</settings>
<formElements>
<imageUploader>
<settings>
<allowedExtensions>jpg jpeg gif png ico apng</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
</uploaderConfig>
</settings>
</imageUploader>
</formElements>
</field>
<field name="head_default_title" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Page Title</label>
<dataScope>head_default_title</dataScope>
</settings>
</field>
<field name="head_title_prefix" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Page Title Prefix</label>
<dataScope>head_title_prefix</dataScope>
</settings>
</field>
<field name="head_title_suffix" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Page Title Suffix</label>
<dataScope>head_title_suffix</dataScope>
</settings>
</field>
<field name="head_default_description" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Meta Description</label>
<dataScope>head_default_description</dataScope>
</settings>
</field>
<field name="head_default_keywords" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Meta Keywords</label>
<dataScope>head_default_keywords</dataScope>
</settings>
</field>
<field name="head_includes" formElement="textarea">
<settings>
<notice translate="true">This will be included before head closing tag in page HTML.</notice>
<dataType>text</dataType>
<label translate="true">Scripts and Style Sheets</label>
<dataScope>head_includes</dataScope>
</settings>
</field>
<field name="head_demonotice" formElement="select">
<settings>
<dataType>text</dataType>
<label translate="true">Display Demo Store Notice</label>
<dataScope>head_demonotice</dataScope>
</settings>
<formElements>
<select>
<settings>
<options class="MagentoConfigModelConfigSourceYesno"/>
</settings>
</select>
</formElements>
</field>
</fieldset>
<fieldset name="header">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">Header</label>
</settings>
<field name="header_logo_src" formElement="imageUploader">
<settings>
<label translate="true">Logo Image</label>
<componentType>imageUploader</componentType>
</settings>
<formElements>
<imageUploader>
<settings>
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
</uploaderConfig>
</settings>
</imageUploader>
</formElements>
</field>
<field name="header_logo_width" formElement="input">
<settings>
<validation>
<rule name="validate-digits" xsi:type="boolean">true</rule>
</validation>
<dataType>number</dataType>
<label translate="true">Logo Attribute Width</label>
<dataScope>header_logo_width</dataScope>
</settings>
</field>
<field name="header_logo_height" formElement="input">
<settings>
<validation>
<rule name="validate-digits" xsi:type="boolean">true</rule>
</validation>
<dataType>number</dataType>
<label translate="true">Logo Attribute Height</label>
<dataScope>header_logo_height</dataScope>
</settings>
</field>
<field name="header_welcome" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Welcome Text</label>
<dataScope>header_welcome</dataScope>
</settings>
</field>
<field name="header_logo_alt" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Logo Image Alt</label>
<dataScope>header_logo_alt</dataScope>
</settings>
</field>
</fieldset>
<fieldset name="footer">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">Footer</label>
</settings>
<field name="footer_absolute_footer" formElement="textarea">
<settings>
<notice translate="true">This will be displayed just before the body closing tag.</notice>
<dataType>text</dataType>
<label translate="true">Miscellaneous HTML</label>
<dataScope>footer_absolute_footer</dataScope>
</settings>
</field>
<field name="footer_copyright" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Copyright</label>
<dataScope>footer_copyright</dataScope>
</settings>
</field>
</fieldset>
<fieldset name="search_engine_robots" sortOrder="120">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label>Search Engine Robots</label>
</settings>
<field name="default_robots" formElement="select">
<settings>
<notice translate="true">This will be included before head closing tag in page HTML.</notice>
<dataType>text</dataType>
<label translate="true">Default Robots</label>
<dataScope>default_robots</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
<formElements>
<select>
<settings>
<options class="MagentoConfigModelConfigSourceDesignRobots"/>
</settings>
</select>
</formElements>
</field>
<field name="custom_instructions" formElement="textarea">
<settings>
<dataType>text</dataType>
<label translate="true">Edit custom instruction of robots.txt File</label>
<dataScope>custom_instructions</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
</field>
<field name="reset_to_defaults" class="MagentoThemeUiComponentDesignConfigSearchRobotsResetButton" component="Magento_Theme/js/form/component/robots-reset-button" template="Magento_Theme/form/button-field" formElement="button">
<settings>
<notice translate="true">This action will delete your custom instructions and reset robots.txt file to system's default settings.</notice>
<dataScope>reset_to_defaults</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
<formElements>
<button>
<settings>
<title translate="true">Reset To Defaults</title>
</settings>
</button>
</formElements>
</field>
</fieldset>
</fieldset>
</form>









share|improve this question
















I am making customer file attribute,first time i am getting that error -



Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/xxx/xxx/vendor/magento/framework/File/Uploader.php on line 552



After solve this then i am getting that error in console -



Uncaught ReferenceError: Base64 is not defined



i am using this code -



use MagentoFrameworkSetupUpgradeDataInterface;
use MagentoFrameworkSetupModuleDataSetupInterface;
use MagentoFrameworkSetupModuleContextInterface;
use MagentoCustomerSetupCustomerSetupFactory;
use MagentoCustomerModelCustomer;
use MagentoEavModelEntityAttributeSet as AttributeSet;
use MagentoEavModelEntityAttributeSetFactory as AttributeSetFactory;


class UpgradeData implements UpgradeDataInterface

protected $customerSetupFactory;
private $attributeSetFactory;

public function __construct(
CustomerSetupFactory $customerSetupFactory, AttributeSetFactory $attributeSetFactory
)
$this->customerSetupFactory = $customerSetupFactory;
$this->attributeSetFactory = $attributeSetFactory;



public function upgrade( ModuleDataSetupInterface $setup, ModuleContextInterface $context )

if (version_compare($context->getVersion(), '1.0.4') < 0)

$setup->startSetup();
$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

$customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
$attributeSetId = $customerEntity->getDefaultAttributeSetId();

$attributeSet = $this->attributeSetFactory->create();
$attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

$customerSetup->addAttribute(MagentoCustomerModelCustomer::ENTITY, 'twilio_image', [
'type' => 'text',
'label' => 'Twilio Image',
'input' => 'file',
"source" => '',
'required' => false,
'default' => '0',
'visible' => true,
'user_defined' => true,
'sort_order' => 210,
'position' => 210,
'system' => false,
]);

$image = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'twilio_image')
->addData([
'attribute_set_id' => $attributeSetId,
'attribute_group_id' => $attributeGroupId,
'used_in_forms' => ['adminhtml_customer', 'customer_account_create', 'customer_account_edit'],
]);

$image->save();
$setup->endSetup();





/vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml



<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">design_config_form.design_config_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Theme Information</item>
<item name="template" xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<buttons>
<button name="save_and_continue" class="MagentoThemeBlockAdminhtmlDesignConfigEditSaveAndContinueButton"/>
<button name="save" class="MagentoThemeBlockAdminhtmlDesignConfigEditSaveButton"/>
<button name="back" class="MagentoThemeBlockAdminhtmlDesignConfigEditBackButton"/>
</buttons>
<namespace>design_config_form</namespace>
<dataScope>data</dataScope>
<deps>
<dep>design_config_form.design_config_form_data_source</dep>
</deps>
</settings>
<dataSource name="design_config_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<settings>
<submitUrl path="theme/design_config/save"/>
</settings>
<dataProvider class="MagentoThemeModelDesignConfigDataProvider" name="design_config_form_data_source">
<settings>
<clientConfig>
<param name="validateBeforeSave" xsi:type="boolean">false</param>
</clientConfig>
<requestFieldName>scope</requestFieldName>
<primaryFieldName>scope</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="other_settings" sortOrder="30">
<settings>
<label translate="true">Other Settings</label>
</settings>
<fieldset name="head">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">HTML Head</label>
</settings>
<field name="head_shortcut_icon" formElement="imageUploader">
<settings>
<notice translate="true">Not all browsers support all these formats!</notice>
<label translate="true">Favicon Icon</label>
<componentType>imageUploader</componentType>
</settings>
<formElements>
<imageUploader>
<settings>
<allowedExtensions>jpg jpeg gif png ico apng</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
</uploaderConfig>
</settings>
</imageUploader>
</formElements>
</field>
<field name="head_default_title" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Page Title</label>
<dataScope>head_default_title</dataScope>
</settings>
</field>
<field name="head_title_prefix" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Page Title Prefix</label>
<dataScope>head_title_prefix</dataScope>
</settings>
</field>
<field name="head_title_suffix" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Page Title Suffix</label>
<dataScope>head_title_suffix</dataScope>
</settings>
</field>
<field name="head_default_description" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Meta Description</label>
<dataScope>head_default_description</dataScope>
</settings>
</field>
<field name="head_default_keywords" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Default Meta Keywords</label>
<dataScope>head_default_keywords</dataScope>
</settings>
</field>
<field name="head_includes" formElement="textarea">
<settings>
<notice translate="true">This will be included before head closing tag in page HTML.</notice>
<dataType>text</dataType>
<label translate="true">Scripts and Style Sheets</label>
<dataScope>head_includes</dataScope>
</settings>
</field>
<field name="head_demonotice" formElement="select">
<settings>
<dataType>text</dataType>
<label translate="true">Display Demo Store Notice</label>
<dataScope>head_demonotice</dataScope>
</settings>
<formElements>
<select>
<settings>
<options class="MagentoConfigModelConfigSourceYesno"/>
</settings>
</select>
</formElements>
</field>
</fieldset>
<fieldset name="header">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">Header</label>
</settings>
<field name="header_logo_src" formElement="imageUploader">
<settings>
<label translate="true">Logo Image</label>
<componentType>imageUploader</componentType>
</settings>
<formElements>
<imageUploader>
<settings>
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
</uploaderConfig>
</settings>
</imageUploader>
</formElements>
</field>
<field name="header_logo_width" formElement="input">
<settings>
<validation>
<rule name="validate-digits" xsi:type="boolean">true</rule>
</validation>
<dataType>number</dataType>
<label translate="true">Logo Attribute Width</label>
<dataScope>header_logo_width</dataScope>
</settings>
</field>
<field name="header_logo_height" formElement="input">
<settings>
<validation>
<rule name="validate-digits" xsi:type="boolean">true</rule>
</validation>
<dataType>number</dataType>
<label translate="true">Logo Attribute Height</label>
<dataScope>header_logo_height</dataScope>
</settings>
</field>
<field name="header_welcome" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Welcome Text</label>
<dataScope>header_welcome</dataScope>
</settings>
</field>
<field name="header_logo_alt" formElement="input">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Logo Image Alt</label>
<dataScope>header_logo_alt</dataScope>
</settings>
</field>
</fieldset>
<fieldset name="footer">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label translate="true">Footer</label>
</settings>
<field name="footer_absolute_footer" formElement="textarea">
<settings>
<notice translate="true">This will be displayed just before the body closing tag.</notice>
<dataType>text</dataType>
<label translate="true">Miscellaneous HTML</label>
<dataScope>footer_absolute_footer</dataScope>
</settings>
</field>
<field name="footer_copyright" formElement="textarea">
<settings>
<validation>
<rule name="validate-no-html-tags" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Copyright</label>
<dataScope>footer_copyright</dataScope>
</settings>
</field>
</fieldset>
<fieldset name="search_engine_robots" sortOrder="120">
<settings>
<level>1</level>
<collapsible>true</collapsible>
<label>Search Engine Robots</label>
</settings>
<field name="default_robots" formElement="select">
<settings>
<notice translate="true">This will be included before head closing tag in page HTML.</notice>
<dataType>text</dataType>
<label translate="true">Default Robots</label>
<dataScope>default_robots</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
<formElements>
<select>
<settings>
<options class="MagentoConfigModelConfigSourceDesignRobots"/>
</settings>
</select>
</formElements>
</field>
<field name="custom_instructions" formElement="textarea">
<settings>
<dataType>text</dataType>
<label translate="true">Edit custom instruction of robots.txt File</label>
<dataScope>custom_instructions</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
</field>
<field name="reset_to_defaults" class="MagentoThemeUiComponentDesignConfigSearchRobotsResetButton" component="Magento_Theme/js/form/component/robots-reset-button" template="Magento_Theme/form/button-field" formElement="button">
<settings>
<notice translate="true">This action will delete your custom instructions and reset robots.txt file to system's default settings.</notice>
<dataScope>reset_to_defaults</dataScope>
<scopeLabel>[WEBSITE]</scopeLabel>
</settings>
<formElements>
<button>
<settings>
<title translate="true">Reset To Defaults</title>
</settings>
</button>
</formElements>
</field>
</fieldset>
</fieldset>
</form>






magento2 adminhtml customer-attribute






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 22 at 10:21







sumeet bajaj

















asked May 22 at 10:02









sumeet bajajsumeet bajaj

1669




1669












  • error is from Js not from php

    – magefms
    May 22 at 10:04











  • here both are related

    – sumeet bajaj
    May 22 at 10:05

















  • error is from Js not from php

    – magefms
    May 22 at 10:04











  • here both are related

    – sumeet bajaj
    May 22 at 10:05
















error is from Js not from php

– magefms
May 22 at 10:04





error is from Js not from php

– magefms
May 22 at 10:04













here both are related

– sumeet bajaj
May 22 at 10:05





here both are related

– sumeet bajaj
May 22 at 10:05










3 Answers
3






active

oldest

votes


















0














if you are using magento2.3 you have to just change



type="fileUploader"



to



type="imageUploader"



in your ui compoent grid



this error is not regarding attribute creation ,it's mistake in custom ui component grid






share|improve this answer























  • yes i am using magento2.3,i already change fileUploader to imageUploader but not working

    – sumeet bajaj
    May 22 at 10:17











  • Have you check after flushing cache?

    – Rutvee Sojitra
    May 22 at 10:17











  • please paste vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml in question

    – Rutvee Sojitra
    May 22 at 10:19











  • please check now i updated

    – sumeet bajaj
    May 22 at 10:21












  • Please also make sure that you have not used fileUploader type in custom grid @sumeetbajaj

    – Rutvee Sojitra
    May 22 at 10:25


















0














One of the possible solution of this issue by overriding the



vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml



Change the formElement from fileUploader to imageUploader



I hope this will help






share|improve this answer


















  • 1





    i already add there but not not working

    – sumeet bajaj
    May 22 at 10:16


















0














Check the following files:




/vendor/magento/module-email/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-catalog/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-swatches/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml




Then search for



formElement="fileUploader"


replace with



formElement="imageUploader" 


in all the files



Clear cache, then check if the issue is resolved.






share|improve this answer























  • i already changed on that files but here - /vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml is not present fileUploader

    – sumeet bajaj
    May 22 at 10:35











  • it is not working,tried to run all commands

    – sumeet bajaj
    May 22 at 10:35











  • did you run setup:di:compile as well?

    – magefms
    May 22 at 10:36











  • yes i run di:compile still not working

    – sumeet bajaj
    May 22 at 10:42











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f275635%2fmagento-2-uncaught-referenceerror-base64-is-not-defined%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














if you are using magento2.3 you have to just change



type="fileUploader"



to



type="imageUploader"



in your ui compoent grid



this error is not regarding attribute creation ,it's mistake in custom ui component grid






share|improve this answer























  • yes i am using magento2.3,i already change fileUploader to imageUploader but not working

    – sumeet bajaj
    May 22 at 10:17











  • Have you check after flushing cache?

    – Rutvee Sojitra
    May 22 at 10:17











  • please paste vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml in question

    – Rutvee Sojitra
    May 22 at 10:19











  • please check now i updated

    – sumeet bajaj
    May 22 at 10:21












  • Please also make sure that you have not used fileUploader type in custom grid @sumeetbajaj

    – Rutvee Sojitra
    May 22 at 10:25















0














if you are using magento2.3 you have to just change



type="fileUploader"



to



type="imageUploader"



in your ui compoent grid



this error is not regarding attribute creation ,it's mistake in custom ui component grid






share|improve this answer























  • yes i am using magento2.3,i already change fileUploader to imageUploader but not working

    – sumeet bajaj
    May 22 at 10:17











  • Have you check after flushing cache?

    – Rutvee Sojitra
    May 22 at 10:17











  • please paste vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml in question

    – Rutvee Sojitra
    May 22 at 10:19











  • please check now i updated

    – sumeet bajaj
    May 22 at 10:21












  • Please also make sure that you have not used fileUploader type in custom grid @sumeetbajaj

    – Rutvee Sojitra
    May 22 at 10:25













0












0








0







if you are using magento2.3 you have to just change



type="fileUploader"



to



type="imageUploader"



in your ui compoent grid



this error is not regarding attribute creation ,it's mistake in custom ui component grid






share|improve this answer













if you are using magento2.3 you have to just change



type="fileUploader"



to



type="imageUploader"



in your ui compoent grid



this error is not regarding attribute creation ,it's mistake in custom ui component grid







share|improve this answer












share|improve this answer



share|improve this answer










answered May 22 at 10:12









Rutvee SojitraRutvee Sojitra

1,8421321




1,8421321












  • yes i am using magento2.3,i already change fileUploader to imageUploader but not working

    – sumeet bajaj
    May 22 at 10:17











  • Have you check after flushing cache?

    – Rutvee Sojitra
    May 22 at 10:17











  • please paste vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml in question

    – Rutvee Sojitra
    May 22 at 10:19











  • please check now i updated

    – sumeet bajaj
    May 22 at 10:21












  • Please also make sure that you have not used fileUploader type in custom grid @sumeetbajaj

    – Rutvee Sojitra
    May 22 at 10:25

















  • yes i am using magento2.3,i already change fileUploader to imageUploader but not working

    – sumeet bajaj
    May 22 at 10:17











  • Have you check after flushing cache?

    – Rutvee Sojitra
    May 22 at 10:17











  • please paste vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml in question

    – Rutvee Sojitra
    May 22 at 10:19











  • please check now i updated

    – sumeet bajaj
    May 22 at 10:21












  • Please also make sure that you have not used fileUploader type in custom grid @sumeetbajaj

    – Rutvee Sojitra
    May 22 at 10:25
















yes i am using magento2.3,i already change fileUploader to imageUploader but not working

– sumeet bajaj
May 22 at 10:17





yes i am using magento2.3,i already change fileUploader to imageUploader but not working

– sumeet bajaj
May 22 at 10:17













Have you check after flushing cache?

– Rutvee Sojitra
May 22 at 10:17





Have you check after flushing cache?

– Rutvee Sojitra
May 22 at 10:17













please paste vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml in question

– Rutvee Sojitra
May 22 at 10:19





please paste vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml in question

– Rutvee Sojitra
May 22 at 10:19













please check now i updated

– sumeet bajaj
May 22 at 10:21






please check now i updated

– sumeet bajaj
May 22 at 10:21














Please also make sure that you have not used fileUploader type in custom grid @sumeetbajaj

– Rutvee Sojitra
May 22 at 10:25





Please also make sure that you have not used fileUploader type in custom grid @sumeetbajaj

– Rutvee Sojitra
May 22 at 10:25













0














One of the possible solution of this issue by overriding the



vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml



Change the formElement from fileUploader to imageUploader



I hope this will help






share|improve this answer


















  • 1





    i already add there but not not working

    – sumeet bajaj
    May 22 at 10:16















0














One of the possible solution of this issue by overriding the



vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml



Change the formElement from fileUploader to imageUploader



I hope this will help






share|improve this answer


















  • 1





    i already add there but not not working

    – sumeet bajaj
    May 22 at 10:16













0












0








0







One of the possible solution of this issue by overriding the



vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml



Change the formElement from fileUploader to imageUploader



I hope this will help






share|improve this answer













One of the possible solution of this issue by overriding the



vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml



Change the formElement from fileUploader to imageUploader



I hope this will help







share|improve this answer












share|improve this answer



share|improve this answer










answered May 22 at 10:14









Muhammad HashamMuhammad Hasham

4,110102575




4,110102575







  • 1





    i already add there but not not working

    – sumeet bajaj
    May 22 at 10:16












  • 1





    i already add there but not not working

    – sumeet bajaj
    May 22 at 10:16







1




1





i already add there but not not working

– sumeet bajaj
May 22 at 10:16





i already add there but not not working

– sumeet bajaj
May 22 at 10:16











0














Check the following files:




/vendor/magento/module-email/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-catalog/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-swatches/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml




Then search for



formElement="fileUploader"


replace with



formElement="imageUploader" 


in all the files



Clear cache, then check if the issue is resolved.






share|improve this answer























  • i already changed on that files but here - /vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml is not present fileUploader

    – sumeet bajaj
    May 22 at 10:35











  • it is not working,tried to run all commands

    – sumeet bajaj
    May 22 at 10:35











  • did you run setup:di:compile as well?

    – magefms
    May 22 at 10:36











  • yes i run di:compile still not working

    – sumeet bajaj
    May 22 at 10:42















0














Check the following files:




/vendor/magento/module-email/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-catalog/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-swatches/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml




Then search for



formElement="fileUploader"


replace with



formElement="imageUploader" 


in all the files



Clear cache, then check if the issue is resolved.






share|improve this answer























  • i already changed on that files but here - /vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml is not present fileUploader

    – sumeet bajaj
    May 22 at 10:35











  • it is not working,tried to run all commands

    – sumeet bajaj
    May 22 at 10:35











  • did you run setup:di:compile as well?

    – magefms
    May 22 at 10:36











  • yes i run di:compile still not working

    – sumeet bajaj
    May 22 at 10:42













0












0








0







Check the following files:




/vendor/magento/module-email/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-catalog/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-swatches/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml




Then search for



formElement="fileUploader"


replace with



formElement="imageUploader" 


in all the files



Clear cache, then check if the issue is resolved.






share|improve this answer













Check the following files:




/vendor/magento/module-email/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-catalog/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-swatches/view/adminhtml/ui_component/design_config_form.xml
/vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml




Then search for



formElement="fileUploader"


replace with



formElement="imageUploader" 


in all the files



Clear cache, then check if the issue is resolved.







share|improve this answer












share|improve this answer



share|improve this answer










answered May 22 at 10:27









magefmsmagefms

3,2713631




3,2713631












  • i already changed on that files but here - /vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml is not present fileUploader

    – sumeet bajaj
    May 22 at 10:35











  • it is not working,tried to run all commands

    – sumeet bajaj
    May 22 at 10:35











  • did you run setup:di:compile as well?

    – magefms
    May 22 at 10:36











  • yes i run di:compile still not working

    – sumeet bajaj
    May 22 at 10:42

















  • i already changed on that files but here - /vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml is not present fileUploader

    – sumeet bajaj
    May 22 at 10:35











  • it is not working,tried to run all commands

    – sumeet bajaj
    May 22 at 10:35











  • did you run setup:di:compile as well?

    – magefms
    May 22 at 10:36











  • yes i run di:compile still not working

    – sumeet bajaj
    May 22 at 10:42
















i already changed on that files but here - /vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml is not present fileUploader

– sumeet bajaj
May 22 at 10:35





i already changed on that files but here - /vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml is not present fileUploader

– sumeet bajaj
May 22 at 10:35













it is not working,tried to run all commands

– sumeet bajaj
May 22 at 10:35





it is not working,tried to run all commands

– sumeet bajaj
May 22 at 10:35













did you run setup:di:compile as well?

– magefms
May 22 at 10:36





did you run setup:di:compile as well?

– magefms
May 22 at 10:36













yes i run di:compile still not working

– sumeet bajaj
May 22 at 10:42





yes i run di:compile still not working

– sumeet bajaj
May 22 at 10:42

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f275635%2fmagento-2-uncaught-referenceerror-base64-is-not-defined%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림