Author Topic: Extension controller bug  (Read 5052 times)

Offline natdroid

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +30/-2
    • View Profile
    • Contact
Extension controller bug
« on: July 04, 2014, 12:47:19 AM »
in install.php we have 
Code: [Select]
$rm->setType('fonts');
$this->db->query("INSERT INTO ".DB_PREFIX."resource_types (`type_id`, `type_name`, `default_directory`, `default_icon`, `file_types`) VALUES ('10', 'fonts', 'fonts/', 'icon_resource_font.png', '/.+(ttf)$/i');");


in config.xml we have Setting upload font
Code: [Select]
        <item id="text_font">
            <type>resource</type>
            <resource_type>fonts</resource_type>
        </item>

when we try to upload new font image setting show  and offcouse  Filetype not allowed error   >:(

https://www.anonimg.com/img/6318cf615ee29fb1065185354899055f.jpg

HELPPP Final Step to a Great Addon

PS
caching  disabled


UPDATE
Bug Report

file admin/controller/pages/extension/extensions.php line 397
Quote
   array('type' => 'image',

Script HARDCODED  :-X

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1782
  • Karma: +247/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Extension controller bug
« Reply #1 on: July 08, 2014, 04:32:40 AM »
you have restriction by filetype inside your database. table resource_types. see the mask? column file_types
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline natdroid

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +30/-2
    • View Profile
    • Contact
Re: Extension controller bug
« Reply #2 on: July 08, 2014, 01:30:22 PM »
table got updated. Type fonts added. read the post above and I'm sure you'll understand
in install.php we have 
Code: [Select]
$rm->setType('fonts');
$this->db->query("INSERT INTO ".DB_PREFIX."resource_types (`type_id`, `type_name`, `default_directory`, `default_icon`, `file_types`) VALUES ('10', 'fonts', 'fonts/', 'icon_resource_font.png', '/.+(ttf)$/i');");

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1782
  • Karma: +247/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Extension controller bug
« Reply #3 on: July 08, 2014, 02:50:48 PM »
oh.. you found bug in a core
public_html/admin/controller/pages/extension/extensions.php line 408

there hardcode of type
Quote
array('type' => 'image',

as solution i can propose to you use custom setting tpl (look into default_pp_pro config.xml)

Code: [Select]
<custom_settings_template>pages/extension/default_pp_pro_settings.tpl</custom_settings_template>inside your own tpl you can set all html-elements what you want including RL
p.s. do not forget to add this tpl into main.php
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod