1

when xml file go over 64kb, is there a way to explode xml file?

the problem when my xml file go longer than 64kb its show this :(

    Warning: DOMDocument::loadXML(): CData section not finished <tr> <td colspan="2"> <div id="map_canvas in Entity, line: 1929 in C:\wamp\www\qdrah\oc2test1\admin\controller\extension\modification.php on line 132
Warning: DOMDocument::loadXML(): Premature end of data in tag add line 1893 in Entity, line: 1929 in C:\wamp\www\qdrah\oc2test1\admin\controller\extension\modification.php on line 132
Warning: DOMDocument::loadXML(): Premature end of data in tag operation line 1891 in Entity, line: 1929 in C:\wamp\www\qdrah\oc2test1\admin\controller\extension\modification.php on line 132
Warning: DOMDocument::loadXML(): Premature end of data in tag file line 1890 in Entity, line: 1929 in C:\wamp\www\qdrah\oc2test1\admin\controller\extension\modification.php on line 132
Warning: DOMDocument::loadXML(): Premature end of data in tag modification line 2 in Entity, line: 1929 in C:\wamp\www\qdrah\oc2test1\admin\controller\extension\modification.php on line 132Notice: Trying to get property of non-object in C:\wamp\www\qdrah\oc2test1\admin\controller\extension\modification.php on line 143
    ( ! ) Fatal error: Call to a member function getElementsByTagName() on a non-object in C:\wamp\www\qdrah\oc2test1\admin\controller\extension\modification.php on line 145
    Call Stack
    #   Time    Memory  Function    Location
    1   0.0016  300672  {main}( )   ..\index.php:0
    2   0.0396  1156520 Front->dispatch( )  ..\index.php:171
    3   0.0418  1237880 Front->execute( )   ..\front.php:29
    4   0.0418  1237880 Action->execute( )  ..\front.php:34
    5   0.0442  1482808 call_user_func ( )  ..\action.php:65
    6   0.0442  1482840 ControllerExtensionModification->refresh( ) ..\action.php:65

my files show like this:

upload -> have images
install.php
install.xml
readme.txt

i wish to could dividing xml file to move like admin modifications to admin.xml and more because large file is difficult to update, but when i look in admin/controller/extension/installer.php its seem it not possible :(

so currently i see to explode my ocmod in two ocmod, until someone give us solution her or opencart make update to this problem.

admin please add tag ocmod

Ahmad Odeh
  • 148
  • 2
  • 12

1 Answers1

1

ok i find the bug!! xml file store in database and in field type (text) the size of this type is 64KB so when xml file go bigger than 64KB its cut and then it cause the error above!!

for more information about mysql text field type in this link Maximum length for MySQL type text

the type should be MEDIUMTEXT with 16MB size.

so until it fixed you can run this query in opencart database

ALTER TABLE oc_modification CHANGE xml xml MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;

or use it via this ocmod https://drive.google.com/file/d/0B2-nzvg31rU7QVAtZnVGN2lYRzA/view?usp=sharing

if have error in ftp use this ocmod http://www.opencart.com/index.php?route=extension/extension/info&extension_id=18892

thanks

Community
  • 1
  • 1
ahmad odeh
  • 26
  • 2