Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-46873

Uploading non-script file to Web Content Template causes errors

    Details

      Description

      Uploading a non-script file to WC Template uploader causes console and portal errors.

      Steps to Reproduce:

      1. Go to Control Panel > Web Content
      2. Add new Template
      3. Script File > Browse
      4. Upload .jpg file (also tried .doc)
      5. Click Save

      Expected result:
      When I click save, I should get messages that say "Your request failed to complete" and "Please enter a valid script template."

      Actual Result:
      Portal gives “Dynamic Data Mapping is temporarily unavailable.” error and template is not longer accessible.

      Console throws:

      22:10:59,920 ERROR [http-bio-8080-exec-3][JDBCExceptionReporter:82] Incorrect string value: '\xF0\xA5\x86\x93-\xD4...' for column 'script' at row 1
      22:10:59,946 ERROR [http-bio-8080-exec-3][render_portlet_jsp:132] null
      java.sql.SQLException: Incorrect string value: '\xF0\xA5\x86\x93-\xD4...' for column 'script' at row 1
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
              at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
              at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
              at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1135)
              at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
              at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
              at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
              at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
              at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2412)
              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2875)
              at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
              at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
      

      Reproduced on:
      Tomcat 7.0.42 + MySQL 5.5 Portal ce-6.2 GA2.
      Tomcat 7.0.42 + MySQL 5.5 Portal ee-6.2.x GIT ID: 0cfbf763f19a26ed14f3b6f3f5c8ca343c4f95e9.
      Tomcat 7.0.42 + MySQL 5.5 Portal master GIT ID: d91cf625a42ad2d305165a8a2d580d29fa439aa1.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 18 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1