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 when Deleting float field from Content Type #10368

Closed
freddyucv opened this issue Dec 21, 2016 · 6 comments
Closed

Error when Deleting float field from Content Type #10368

freddyucv opened this issue Dec 21, 2016 · 6 comments

Comments

@freddyucv
Copy link

When you try to delete a float field from a content types this error is thrown:

2016-12-20T11:18:30,881 ERROR c.d.q.j.DeleteFieldJob [DotMarketingQuartzExclusiveScheduler_Worker-40] Unable to delete field 'price1'. Field Inode: fc0aaf5b-f017-4563-b030-9c5e946b8c3c, Structure Inode: f65ef197-7425-4202-a5f4-5e6fd1c6e302 com.dotmarketing.exception.DotDataException: Error Clearing Field 'price1' for Structure with id: f65ef197-7425-4202-a5f4-5e6fd1c6e302
at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.clearField(ESContentFactoryImpl.java:2293)
at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.cleanField(ESContentletAPIImpl.java:845)
at com.dotmarketing.portlets.contentlet.business.ContentletAPIInterceptor.cleanField(ContentletAPIInterceptor.java:385)
at com.dotmarketing.quartz.job.DeleteFieldJob.execute(DeleteFieldJob.java:116)
at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'float4 = WHERE structure_inode = 'f65ef197-7425-4202-a5f4-5e6fd1c6e302' AND (fl' at line 1
at sun.reflect.GeneratedConstructorAccessor84.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.Util.getInstance(Util.java:387)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:942)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2673)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.clearField(ESContentFactoryImpl.java:2275)
... 5 more

Expected Behavior

The field should be deleted successfully

Current Behavior

A exception is thrown
Support ticket:
https://my.dotcms.com/tickets/detail.dot?id=a841427b-f7bf-4de4-a4c4-e6d2650b03d7

Your Environment

  • dotCMS version used: 3.6
@freddyucv
Copy link
Author

PR: #10369

@bryanboza
Copy link
Member

This issue was fixed in MySQL, but is able to reproduce on any other DB.
To recreate:

  • Create a new content type
  • Add a new float field
  • Try to delete this one

@bryanboza
Copy link
Member

Also I have this error after delete some decimal field and create other one in psql... https://gist.github.com/bryanboza/4ec2f65b3a703b5eb36b722add2bd9ce

jgambarios added a commit that referenced this issue Jan 13, 2017
…-float-field-from-Content-Type

#10368 fixing error deleting float field on H2
@jgambarios
Copy link
Contributor

PR: #10430

@bryanboza
Copy link
Member

Right now we don't have the error, but we are not receiving the notifications when you delete the field, to receive that ones, you need refresh the page...

@bryanboza
Copy link
Member

bryanboza commented Jan 31, 2017

Fixed, tested on master-4.0 // H2 // FF

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

No branches or pull requests

4 participants