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.
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
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:
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
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.
Offline
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.)
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...
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
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.
Offline
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
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.
Offline
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
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
bump
Offline
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.
Offline
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
Run the debugger when loading the admin page with the error. What error is reported?
https://kryptronic.com/blog/2012/08/sit … -debugger/
Offline