xoops forums

timgno

Module Developer
Posted on: 2014/8/5 10:00
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#21

Re: TDMCreate 1.91 alpha 1 for Testing

Point 3) I had seen in my tests.

Had already provided for this with the addition of the field field_numb, in the table tdmcreate_fields.

In fact, this field is used only for this work, otherwise I would not have added as unnecessary since there is already a field table_nbfiles in the table tdmcreate_tables.

The work that must be done is to add loops to control this field_numb which table belongs to and it must be done in the file admin/tables.php, case save.

Point 6) Sorry! This is only because I was doing some tests with the var_dump function of php. It is not a bug will be deleted at the appropriate time.

Point 10) At the moment it might be a simple bug, but I assure you it works.

You just have to choose a radiobutton in tab fileds when new or edit that you feel may be the main field

To make you understand I'll show you what it is for!

If you go in the category file or other files, you will notice that there is a line of php class Criteria with such $criteria->setSort('cat_id ASC, cat_name');

The cat_name is main field and you will find it also in the class file.

I hope this has cleared up a lot of ideas

goffy

Just can't stay away
Posted on: 2014/8/5 10:19
goffy
goffy (Show more)
Just can't stay away
Posts: 487
Since: 2010/12/27
#22

Re: TDMCreate 1.91 alpha 1 for Testing

hi timgno

Quote:
Point 6) Sorry! This is only because I was doing some tests with the var_dump function of php. It is not a bug will be deleted at the appropriate time.


The problem is not the output from var_dump.
the problem is, that in table tdmcreate_tables in column "table_mid" and in table tdmcreate_fields in column "field_mid" you find always 257, not the id of the module

timgno

Module Developer
Posted on: 2014/8/5 10:22
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#23

Re: TDMCreate 1.91 alpha 1 for Testing

Are you sure you have not created so many modules up to 257?

goffy

Just can't stay away
Posted on: 2014/8/5 14:57
goffy
goffy (Show more)
Just can't stay away
Posts: 487
Since: 2010/12/27
#24

Re: TDMCreate 1.91 alpha 1 for Testing

Hi timgno

yes, fresh installed.

but please see pic http://wedega.com/downloads/tdmcreate01.png

sometimes there is 257 in field "table_mid", sometimes the correct id
I have no explanation till now, but I try to find out

timgno

Module Developer
Posted on: 2014/8/5 18:39
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#25

Re: TDMCreate 1.91 alpha 1 for Testing

You have to completely uninstall the module, otherwise those fields do not disappear.

Also uninstall your new modules created

goffy

Just can't stay away
Posted on: 2014/8/7 6:17
goffy
goffy (Show more)
Just can't stay away
Posts: 487
Since: 2010/12/27
#26

Re: TDMCreate 1.91 alpha 1 for Testing

hi timgno

I found the problem

in class/tables.php line 109 there is
Quote:
$mods_select->addOption($action, _AM_TDMCREATE_TABLE_MODSELOPT);

if you forget to select a module (as it was in some cases of my tests) you get back the action string as table_mid. In my case action string was
Quote:
/xoops257/htdocs/modules/TDMCreate/admin/tables.php?op=new
so I got back 257

please change line 109 to Quote:
$mods_select->addOption(0, _AM_TDMCREATE_TABLE_MODSELOPT);

and add a check like this
if( ($tablemid == 0) {
    
redirect_header('tables.php?op=new'10_AM_TDMCREATE_ERROR_NO_MODULE_SEL);
    exit();
}
to admin/tables.php before saving operation

I'll continuing tests

timgno

Module Developer
Posted on: 2014/8/7 6:59
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#27

Re: TDMCreate 1.91 alpha 1 for Testing

@goffy

Poured code since the control of select box modules in tab admin/tables is done by javascript instead of using 0, we use two single quotes as string in class/tables.

goffy

Just can't stay away
Posted on: 2014/8/7 7:08
goffy
goffy (Show more)
Just can't stay away
Posts: 487
Since: 2010/12/27
#28

Re: TDMCreate 1.91 alpha 1 for Testing

Hi timgno, I don't understand what you mean

timgno

Module Developer
Posted on: 2014/8/7 7:12
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#29

Re: TDMCreate 1.91 alpha 1 for Testing

Download it from svn again and see the changes that I just made,

Compare them with the previous commit

Go to the tab Tables and without entering any data, click on Submit

goffy

Just can't stay away
Posted on: 2014/8/7 7:37
goffy
goffy (Show more)
Just can't stay away
Posts: 487
Since: 2010/12/27
#30

Re: TDMCreate 1.91 alpha 1 for Testing

works

I'll continuing