This module isn't fully compatible with SQL Server. I have already found some uses of SQL Server incompatible syntax (usage of LIMIT, usage of CURDATE, using a SELECT-alias in the WHERE clause). In this issue, I will try to post patches for things I manage to fix on an ad-hoc base.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sneyerst’s picture

Priority: Normal » Minor
FileSize
682 bytes
434 bytes

I have some preliminary patches here that will only allow the Newsletter module to be installed.
The first one will add a date type for the send_again field in case we should be using SQLSRV.
The second patch will remove the width's on int-fields since that causes an error on SQLSRV.

Don't know wether these are good solutions, but let's work something out. :-)

ParisLiakos’s picture

Thanks. commited the first, the second one is not needed since the role feature removed

sneyerst’s picture

At this moment, I'm actively looking for a solution for following error (which occurs in admin/config/media/newsletter/lists/edit/%):

PDOException: SQLSTATE[42S22]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid column name 'bundle'.: SELECT newsletter_template.[ntid] AS [entity_id], :entity_type AS entity_type, NULL AS revision_id, :bundle AS bundle FROM {newsletter_template} newsletter_template HAVING ([bundle] IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => newsletter_template [:entity_type] => newsletter_template [:bundle] => newsletter_template ) in EntityFieldQuery->execute() (regel 1136 van D:\WORKSPACE\PHP\Site\includes\entity.inc).

Problem with it is the following generated query:

SELECT newsletter_template.[ntid] AS [entity_id], 'newsletter_template' AS entity_type, NULL AS revision_id, 'newsletter_template' AS bundle 
FROM newsletter_template newsletter_template 
HAVING ([bundle] IN ('newsletter_template')) ;

The bundle-column name specified in the HAVING clause is invalid.

I'm starting to fear this problem spans other modules (entity? core?), but I hope someone more familiar with the internal workings of these modules is able to provide more information.

I have already found out that the error occurs when
field_attach_form('newsletter_list', $list, $form, $form_state);
is called in includes/newsletter.admin.inc .

ParisLiakos’s picture

seems there are issues with core entity handling :/
but the thing is that have never something like this...maybe i am doing something wrong when registering the newsletter_template entity..
i ll check it more

fnapo’s picture

Same problem with SQLite installation
Any hint? :-/

PDOException: SQLSTATE[HY000]: General error: 1 a GROUP BY clause is required before HAVING: SELECT newsletter_template.ntid AS entity_id, :entity_type AS entity_type, NULL AS revision_id, :bundle AS bundle FROM {newsletter_template} newsletter_template HAVING (bundle IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => newsletter_template [:entity_type] => newsletter_template [:bundle] => newsletter_template ) in EntityFieldQuery->execute() (linea 1136 di /nfs/c07/h02/mnt/111418/domains/demo.istruzione20.it/html/includes/entity.inc

ParisLiakos’s picture

can i have a debug_backtrace() from either of you?

ParisLiakos’s picture

@#3 and #5
a new seperate issue is open for this problem: #1511132: Database error when creating a new list

also: the core issue i believe is the underlying cause of this problem:
#1054168: EntityFieldQuery fails for entities that have no bundle