Forums / Extensions / eZ Newsletter / SQL error when installing eZ newsletter 1.6beta

SQL error when installing eZ newsletter 1.6beta

Author Message

Michal Slocinski

Tuesday 22 July 2008 2:24:02 am

I'm trying to install new eznewsletter-1.6beta on eZ Publish 4.0.

I started installing packages one by one using administration panel in following order:
- ezlabel
- ezapprove2
- ezmailimport
- eznewsletter
- eznewsletter_builder
- eznewsletter_classes

All above packages were installed successfully.

Next, I install eznewsletter_democontent and I see 3 screens:
- information about elements to be installed
- query how to map 'ger' site
- information about placement of top nodes

After these 3 screens I get following error message on the screen:

Fatal error: A database transaction in eZ Publish failed.

The current execution was stopped to prevent further problems.
You should contact the System Administrator of this site with the information on this page.
The current transaction ID is TRANSID-7bbb72155d4c2aebc7fcbedf2d0fa645 and has been logged.
Please include the transaction ID and the current URL when contacting the system administrator.

After looking into error.log I see following:

[ Jul 22 2008 10:56:14 ] [78.8.2.187] eZMySQLiDB:
Query error: 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 ')  AND (lang_mask & 8 )  > 0' at line 1. Query: UPDATE ezurlalias_ml SET lang_mask = ( lang_mask | 1 )  WHERE action in ()  AND (lang_mask & 8 )  > 0
[ Jul 22 2008 10:56:14 ] [78.8.2.187] eZDBInterface::commit TRANSID-d6600378ef19fdeb32955b519e791982:
Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-d6600378ef19fdeb32955b519e791982.

I tried with both - MySQL and MySQLi drivers - same errors.

PHP version: 5.2.6
MySQL server version: 5.1.26-rc-log
MySQL client API version: 5.1.24-rc

Did anyone encounter such issues? Is there any workaround?

When is final eZ newsletter 1.6 version expected?

Michal

Andrei H.

Tuesday 22 July 2008 2:35:30 am

Hello Michal,

maybe you have to update your database structure. Have a look in your "eznewsletter.ezpkg". There is a sql-snippet "eznewsletter.ezpkg\eznewsletter\ezextension\eznewsletter\sql\mysql\eznewsletter.sql".

Andrei

Michal Slocinski

Tuesday 22 July 2008 3:32:28 am

Good hint - eznewsletter package was installed successfully but DB structures were not created. I created them manually but unfortunately no change in behavior :-/

I uninstalled and installed again all packages but no luck - still same error:

Query error: 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 ')  AND cast(lang_mask & 8 AS SIGNED )  > 0' at line 1. Query: UPDATE ezurlalias_ml SET lang_mask = cast( lang_mask | 1 AS SIGNED )  WHERE action in ()  AND cast(lang_mask & 8 AS SIGNED )  > 0

reason for why it is failing is this bit:

... WHERE action in () ....

"in () " cannot be empty. Unfortunately I've no idea what can be root cause of this problem.

Piotrek Karaś

Tuesday 09 September 2008 9:11:35 pm

Seems like a very similar (or same) thing here...
I submitted this as an issue, but seems like the update you mentioned is expected to be enough...:
http://issues.ez.no/IssueView.php?Id=13465&activeItem=1

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Thomas Weustenfeld

Friday 31 October 2008 8:18:40 am

Hi Michal,

the packages can only be used with the setup wizard.
it is not possible to import the eZ Newsletter packages
by using the administration panel, because the packages
contain code as well, which is only executed if the packages
are imported by the wizard.

There are currently two ways to install eZ Newsletter 1.6.
You can use the setup wizard on a clean installation of eZ publish,
which has not already been set up or you can do the installation manually.

If you want to install the latest packages from trunk you will have
to host the packages yourself (for example at http://localhost/packages).
Then edit settings/package.ini and set RemotePackagesIndexURL
to http://localhost/packages or whatever.
You also have to customize the index.xml located in this directory to your local paths.

If you plan to have a manual installation (what is necessary on a
existing eZ publish installation), I propose that you get the
latest extensions directly from svn and copy them to your local
extension directory.

The default setup installs the following extensions:
- ezapprove2
- ezlabel
- ezmailimport
- eznewsletter
- eznewsletter_builder
- eznewsletter_designs

After these extensions are copied the wizard would do the following configuration:

- Newsletter specific database tables are set up
(SQL files can be found within the several extensions)
- Roles and policies are set up
- An editorial siteaccess is created
- INI files are configured
- Content classes & demo content are imported
(- autoload/ezp_extension.php is updated)

You will have to handle all these things manually.
Content classes and demo content are defined in eznewsletter_classes.ezpkg
and eznewsletter_democontent.ezpkg and can (as an exception) be imported
by using the package import from admin interface.
As far as I know it is possible that the latest package (eznewsletter_democontent.ezpkg)
is not imported during the setup for some reason. In this case you can
also use the admin panel to import it afterwards.
In addition older packages (current 1.6beta packages) require
that 'ger' is mapped to an existing language. So please verify that
all classes from eznewsletter_classes.ezpkg are imported correctly
(newsletter_issue, newsletter_article, ... ).

If you install the newsletter on an existing installation,
I would suggest that you run the setup wizard again on a clean eZ publish
installation and compare it to your installation ... or you can follow
the setup guide (http://ez.no/doc/extensions/newsletter), which is unfortunately
not 100% up to date.

I hope this has been of some help to you :-)
Best regards,
Thomas

Thomas Weustenfeld

Friday 31 October 2008 8:32:46 am

http://issues.ez.no/IssueView.php?Id=13465&activeItem=1

This issue is caused by a database update in latest trunk version. I don't think
that this is related with the transaction error mentioned above.

Thomas

Jan Komárek

Thursday 20 November 2008 2:20:58 am

Installation description looks good, but locating Newsletter SVN rtepository is hardwork. I am newbie in EZ Publish so I dont use good information sources maybe.

Extensions SVN http://svn.ez.no/svn/extensions/

Julian Mancera

Wednesday 03 December 2008 9:50:45 am

Hi Thomas,

There is an error in the latest package eznewsletter_classes.ezpkg. In the installation tutorial there is an step that states to add the approriate attribute ids for each eznewsletter classes in the content.ini.append in the eznewsletter_builder extension:

[ObjectRelationDataTypeSettings]
ClassAttributeStartNode[]
#newsletter article main image
#ClassAttributeStartNode[]=190;AddRelatedImages

#newsletter article small image
#ClassAttributeStartNode[]=192;AddRelatedImages

#newsletter article middle image
#ClassAttributeStartNode[]=193;AddRelatedImages

#newsletter article big image
#ClassAttributeStartNode[]=194;AddRelatedImages

#newsletter issue header image
#ClassAttributeStartNode[]=201;AddRelatedImages

#newsletter issue topics
#ClassAttributeStartNode[]=203;AddRelatedTopics

That classes in the packages does not include the following attributes:
small image
middle image
big image
topics

Could you update the packages to complete the installation, please?

Julian Mancera
Aplyca Tecnologia

Michal Slocinski

Tuesday 20 January 2009 3:32:50 pm

I can't believe it but I managed to get it working :-)

I'm talking here about 'beta' version version published on the download page, not trunk.

The trick was to import all the packages via UI during eZ Publish installation / site setup process.

Using this method, everything went smoothly and first mails are sent out, horray ! :-)

Joël LEGER

Saturday 07 February 2009 5:05:16 am

Hi i try to follow the process from the wizard install but every package i tried to upload was defined with no title and no dependencies.
So my question us how to upload every packages during the install ?