Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-15-2015 11:55:41

Blitzen
Member
From: USA
Registered: 01-01-2005
Posts: 936

Adding new selection list, SELECT-TABLE

Hi,
What tables and fields need to be completed to add a new SELECT-TABLE.
I've created the table listing the new options for the <SELECT> tag.

The field was added to ecom_cat.

The field for the table, ecom_cat, was modified in core_columndefs to indicate a SELECT-TABLE with the query in *displaydata:
SELECT {COLS} FROM myNewTable

But admin gives an error.
Script Execution Error
There was a processing problem encountered while processing your request. Please try again later.
File: /core/CORE/CORE.php Line: 471 Error Number: 256

What am I missing?

Thanks!

Offline

 

#2 01-16-2015 08:59:53

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19805
Website

Re: Adding new selection list, SELECT-TABLE

Do you have at least one row in the table that the select field can be built from?


Nick Hendler

Offline

 

#3 01-16-2015 12:37:09

Blitzen
Member
From: USA
Registered: 01-01-2005
Posts: 936

Re: Adding new selection list, SELECT-TABLE

webmaster wrote:

Do you have at least one row in the table that the select field can be built from?

Which table? The new one with the options listed, myNewTable, or the core_columndefs?

myNewTable has only 2 fields, a primary key and the options to be listed alphabetically.

The error occurs whether or not cinsdisplaydata and cupddisplaydata are completed.
core_columndefs:

Code:

cid: myNewTable.myNewOptionsField
cowner: me
cname: My New Table Selection
ctype: text
cnumeric: 255
crequired: 1
cinsdisplaytype: SELECT-TABLE
cinsdisplaydata: SELECT {COLS} FROM myNewTable ORDER BY sort
cinsdisplayinclude: 
cinsdefaultvalue: 
cupddisplaytype: SELECT-TABLE
cupddisplaydata: SELECT {COLS} FROM myNewTable ORDER BY myNewOptionsField
cupddisplayinclude: 
cbackendlist: 1
cdescription: The description
csection: The section

Offline

 

#4 01-19-2015 09:59:49

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19805
Website

Re: Adding new selection list, SELECT-TABLE

You've got it set up wrong.  First add your table, and the proper columndefs for it.  The cinsdisplaytype and cupddisplaytype for all your columns should be TEXTBOX-REG, and cinsdisplaydata and cupddisplaydata should be empty.  In the table you want to reference this one (ie, in ecom_prod, if you want this table tied to a product field), that is were you set up a new column with the displaytype and displaydata variables you're using there.  That new field will render if you have at least one row in the new table.


Nick Hendler

Offline

 

#5 01-21-2015 10:25:08

Blitzen
Member
From: USA
Registered: 01-01-2005
Posts: 936

Re: Adding new selection list, SELECT-TABLE

First, is there a MULTI-SELECT configuration? If so, I'll need that.

Second, with the settings, below, I am getting an error. Please help.
"Script Execution Error
There was a processing problem encountered while processing your request. Please try again later.
File: /core/CORE/CORE.php Line: 471 Error Number: 256"

myNewTable and its fields were added via Admin.

TABLE: core_columndefs, For the new table, the fields are like this. (Of course, the cid is different for each field.)

Code:

cid: myNewTable.myNewField
cowner: me
cname: My New Table Selections
ctype: text
cnumeric: 255
crequired: 1
cinsdisplaytype: TEXTBOX-REG
cinsdisplaydata:
cinsdisplayinclude: 
cinsdefaultvalue: 
cupddisplaytype: TEXTBOX-REG
cupddisplaydata:
cupddisplayinclude: 
cbackendlist: 1
cdescription: The description
csection: The section

TABLE: core_columndefs, for the new field in ecom_prod that is to be a <select> element with options from myNewTable...

Code:

cid: ecom_prod.myNewProdField
cowner: me
cname: My New Table Selection
ctype: text
cnumeric: 255
crequired: 1
cinsdisplaytype: SELECT-TABLE
cinsdisplaydata: SELECT {COLS} FROM myNewTable ORDER BY sort
cinsdisplayinclude: 
cinsdefaultvalue: 
cupddisplaytype: SELECT-TABLE
cupddisplaydata: SELECT {COLS} FROM myNewTable ORDER BY sort
cupddisplayinclude: 
cbackendlist: 1
cdescription: The description
csection: The section

Last edited by Blitzen (01-21-2015 10:46:39)

Offline

 

#6 01-22-2015 08:54:42

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19805
Website

Re: Adding new selection list, SELECT-TABLE

Did you create the table with the admin interface?  If not, you're missing the core_tabledefs definition for the table itself.  And the primary key really should be named 'id'.  That's a standard practice within the software - not completely necessary, but I'd do it.


Nick Hendler

Offline

 

#7 01-22-2015 18:54:45

Blitzen
Member
From: USA
Registered: 01-01-2005
Posts: 936

Re: Adding new selection list, SELECT-TABLE

Yes, table was created in Admin.

core_tabledefs for the new table is

tid    myNewTable
towner    me@me.com
tname    New Table Name
tdrop    1
tinsert    1
tupdate    1
tdelete    1
tdisplay    tid
torderby    tid ASC
tprimkey    tid
tautoinc    0
tdescription    Table desc
thasapp    0

Offline

 

#8 01-23-2015 09:12:47

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19805
Website

Re: Adding new selection list, SELECT-TABLE

tdisplay    tid
torderby    tid ASC
tprimkey    tid

Why did you use 'tid' as your primary key?  Drop that table and use 'id' as your primary key.  Then reference as myNewTable.id.


Nick Hendler

Offline

 

#9 01-23-2015 10:18:56

Blitzen
Member
From: USA
Registered: 01-01-2005
Posts: 936

Re: Adding new selection list, SELECT-TABLE

Is the 'tid; that why it's breaking? The table was from another program.
Curious - Why do you insist on using "id" (not all of your tables use "id")?

Last edited by Blitzen (01-23-2015 10:28:42)

Offline

 

#10 01-23-2015 10:30:28

Blitzen
Member
From: USA
Registered: 01-01-2005
Posts: 936

Re: Adding new selection list, SELECT-TABLE

I changed the table primary key to be "id" in the new table and changed it in core_tabledefs and core_columndefs.

Still have an error:

Script Execution Error
There was a processing problem encountered while processing your request. Please try again later.
File: /core/CORE/CORE.php Line: 471 Error Number: 256

Offline

 

#11 01-27-2015 17:08:12

Blitzen
Member
From: USA
Registered: 01-01-2005
Posts: 936

Re: Adding new selection list, SELECT-TABLE

bump

Offline

 

#12 01-28-2015 11:34:01

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19805
Website

Re: Adding new selection list, SELECT-TABLE

Start over.  Drop your table, remove all core_tabledefs and core_columndefs entries for it.  Also get rid of your core_columndefs change to the ecom_prod table.  Use the admin interface to create it, using the primary key as 'id'.  Then add a row to the table, so you have data in it that manage products can pull, then make your change for ecom_prod to the core_columndefs table.


Nick Hendler

Offline

 

#13 01-29-2015 12:53:58

Blitzen
Member
From: USA
Registered: 01-01-2005
Posts: 936

Re: Adding new selection list, SELECT-TABLE

The tables were created via admin. Forcing the field to be "id" doesn't work either.
I will use the SELECT-CUSTOM instead. Our server is fast enough for the added data.
Thanks for your time.

Offline

 

#14 01-30-2015 09:14:16

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19805
Website

Re: Adding new selection list, SELECT-TABLE

Run the debugger when loading the admin page with the error.  What error is reported?

https://kryptronic.com/blog/2012/08/sit … -debugger/


Nick Hendler

Offline

 

Board footer