sonata-project / SonataPageBundle

This bundle provides a Site and Page management through container and block services
https://docs.sonata-project.org/projects/SonataPageBundle
MIT License
219 stars 210 forks source link

Can't access any page (created with SonataAdmin) with postgresql (works ok with mysql) #317

Closed grizzlylab closed 10 years ago

grizzlylab commented 10 years ago

An exception occurred while executing 'SELECT p0_.route_name AS routename0, p0.page_alias AS pagealias1, p0.type AS type2, p0.position AS position3, p0.enabled AS enabled4, p0.decorate AS decorate5, p0.name AS name6, p0.url AS url7, p0.parent_id AS parentid8, p0.target_id AS targetid9, p0.content AS content10, p0_.publication_date_start AS publication_datestart11, p0.publication_date_end AS publication_dateend12, p0.created_at AS createdat13, p0.updated_at AS updatedat14, p0.id AS id15, p0_.site_id AS siteid16, p0.page_id AS page_id17 FROM page_snapshot p0 WHERE (p0_.publication_datestart <= ? AND (p0.publication_dateend IS NULL OR p0.publication_dateend >= ?)) AND p0.page_id = ? LIMIT 1' with params ["2014-04-21 19:36:59", "2014-04-21 19:36:59", "false"]:

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "false"

greg0ire commented 10 years ago

@grizzlylab : I know it's late, but... could you try with the code I want to merge with #333 ?

grizzlylab commented 10 years ago

@greg0ire Hi, sorry but I removed this bundle from my project because this problem. Hope it will fix it, maybe Ill try it again with psql.

greg0ire commented 10 years ago

If anyone wants to use my fork while this bug exists, they can do so by applying the following modifications to their dependency file :

diff --git a/composer.json b/composer.json
index 74440ba..daace6b 100644
--- a/composer.json
+++ b/composer.json
@@ -8,6 +8,10 @@
     "autoload": {
         "psr-0": { "": "src/", "SymfonyStandard": "app/" }
     },
+    "repositories": [{
+        "type": "vcs",
+        "url": "https://github.com/greg0ire/SonataPageBundle"
+    }],
     "require": {
         "php": ">=5.3.3",
         "symfony/symfony": "v2.5.0-BETA2",
@@ -29,7 +33,7 @@
         "knplabs/knp-menu-bundle": "~1.1",
         "sonata-project/admin-bundle": "~2.3",
         "sonata-project/doctrine-orm-admin-bundle": "~2.3",
-        "sonata-project/page-bundle": "2.3.x-dev",
+        "sonata-project/page-bundle": "dev-bugfixes as 2.3.x-dev",
         "sonata-project/user-bundle": "~2.2",
         "symfony-cmf/routing-bundle": "~1.2",
         "sonata-project/jquery-bundle": "1.8.3",
rande commented 10 years ago

fixed by https://github.com/sonata-project/SonataPageBundle/pull/363