Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating CDATA table #979

Closed
yakatz opened this issue Jun 3, 2014 · 9 comments · Fixed by #1004
Closed

Error creating CDATA table #979

yakatz opened this issue Jun 3, 2014 · 9 comments · Fixed by #1004

Comments

@yakatz
Copy link
Contributor

yakatz commented Jun 3, 2014

On a new install, I get this error by email:

[CREATE TABLE `ost_ticket__cdata` (PRIMARY KEY (ticket_id)) AS SELECT entry.`object_id` AS ticket_id, FROM ost_form_entry entry JOIN ost_form_entry_values ans ON ans.entry_id = entry.id JOIN ost_form_field field ON field.id=ans.field_id WHERE entry.object_type='T' GROUP BY entry.object_id]

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM ost_form_entry entry
JOIN ost_form_entry_values ans ON ans.entr' at line 2



---- Backtrace ----

#0 (root)/include/mysqli.php(163): osTicket->logDBError('DB Error #1064', '[CREATE TABLE ...')<br /> #1 (root)/include/class.dynamic_forms.php(238): db_query('CREATE TABLE o...')

#2 (root)/include/class.dynamic_forms.php(218): TicketForm::buildDynamicDataView()

#3 (root)/include/staff/tickets.inc.php(248): TicketForm::ensureDynamicDataView()

#4 (root)/scp/tickets.php(621): require_once('/data/srv/...')

#5 (root)/scp/index.php(17): require('/data/srv/...')

#6 {main}

The error seems to stem from an extra comma before FROM (although there should probably be more columns there).

@greezybacon
Copy link
Contributor

Which version is this you're installing?

@danielmarcoto
Copy link

I got the same problem after installing version 1.9.1.
It happens by fetching from e-mail.

@yakatz
Copy link
Contributor Author

yakatz commented Jun 6, 2014

Checkout from the develop branch.

image

@yakatz
Copy link
Contributor Author

yakatz commented Jun 6, 2014

The database server is MariaDB, but all the tables are InnoDB if it matters.

@greezybacon
Copy link
Contributor

My bad. I noticed and triaged this a few days ago. I thought I had corrected it upstream.

Can you guys try the patch in #1004.

@greezybacon
Copy link
Contributor

@drmarcoto this patch doesn't affect your issue, as #1004 is specific to the 1.8 branch

@yakatz
Copy link
Contributor Author

yakatz commented Jun 6, 2014

I will probably get around it it later this weekend. What is the recommended way of applying the patch?

@yakatz
Copy link
Contributor Author

yakatz commented Jun 8, 2014

Not fixed.

@wogsland
Copy link

In my installation (v1.8.3-26-gb0a2fe8) I am seeing the same issue, but the line in include/class.dynamic_forms.php mentioned in #1004 is already

var $_dfields;

rather than

var $_dfields = array();

I even tried switching it to see if I had things backwards and that didn't stop the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants