Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

better workflow and playa not previewing

Peter McDonagh's Avatar

Peter McDonagh

07 Mar, 2013 10:09 AM

hi there,
I'm having an issue with the current version of P&T playa and betterworkflow. When i add a related entry to a playa field, I can no longer preview the main entry. Is there a solution or work-around for this?

My understanding is that playa is compatible with the better workflow extension.

Thanks for getting back to me. I'm using the latest version of everything:

Version numbers:

ExpressionEngine 2.5.5
Better Workflow 1.5.1
Matrix 2.5.3
Playa 4.3.3


I saw this post while I was hunting for a solution, but I understood that it was only applicable to playa versions prior to 4.3.1?
http://labs.electricputty.co.uk/post/better_workflow_now_were_playa...

I can't see the section (mod.playa.php) referred to in the post, so I imagine the file version I have is completely different as its playa 4.3.3, and that the hook is already inserted

My test template page includes the following basic setup:


{exp:channel:entries channel="homepage"}

{homepage_snippet}

{test_matrix} {cell_1} {cell_2} {/test_matrix}

{test_playa} {title} {/test_playa}

{/exp:channel:entries}


If I add anything to the playa filed and then try to preview, it just hangs showing the popup modal and animation. Cancelling the modal - it brings me back to the entry which is now set to draft.

Deleting the draft gives the following database error.


A Database Error Occurred

Error Number: 1366

Incorrect integer value: '' for column 'col_id' at row 1

INSERT INTO exp_ep_entry_drafts_thirdparty (entry_id, field_id, type, row_id, row_order, col_id, data) VALUES ('27', '31', 'playa', '', 0, '', '14')

Filename: C:\Workspace\test\httpdocs\system\codeigniter\system\database\DB_driver.php

Line Number: 330


I contacted P&T about this issue, and they believe it is an issue with the better workflow extension.
I'd really like to get this to work as I have many playa field requirements and have already committed to using using both extensions on this project based on playa being listed as a supported extension.

thanks for your help!
Pete

  1. 1 Posted by Rob Hodges on 07 Mar, 2013 12:45 PM

    Rob Hodges's Avatar

    Hi Pete,

    This sounds weird, that template should work without any issues. The PHP error you are getting is probably a leftover from the first problem happening. Could you try uninstalling and reinstalled BWF please?

    Also, I notice you are on a Windows machine, we've not tested BWF much on IIS so there could be an issue there.

    When you're click a preview, can you open Firebug or the Chrome Inspector and see if you can see any error messages coming back from the AJAX?

    As a final note, native Playa support is coming soon from Pixel & Tonic, so if we can't get this fixed now, hopefully it will work with that.

    Thanks,

    Rob

  2. 2 Posted by Peter McDonagh on 07 Mar, 2013 03:16 PM

    Peter McDonagh's Avatar

    Hi Rob,

    Thanks for getting back to me on this - I've done the following:


    Disabled / enabled BWF - same issue

    Re: IIS - I'm running this on apache wampserver local setup -
    apache 2.2.21
    php 5.3.9
    mysql 5.5.2


    Firebug data - see below:

    Theres a POST error generating a 500 internal server error -
    POST http://localhost/mhc/system/index.php?S=3c4b21bc...ter=YToxOntzOjEw...

    500 Internal Server Error
    753ms
    jquery...6028154 (line 177)

    "NetworkError: 500 Internal Server Error - http://localhost/mhc/system/index.php?S=3c4b21bc45ea0addbe667c53647...;


    Under the JSON tab:
    "

    Error Number: 1366

    Incorrect integer value: '' for column 'col_id' at row 1

    INSERT INTO `exp_ep_entry_drafts_thirdparty` (`entry_id`, `field_id`, `type`, `row_id`, `row_order`, `col_id`, `data`) VALUES ('27', '31', 'playa', '', 0, '', '14')

    Filename: C:\Workspace\mhc\httpdocs\system\codeigniter\system\database\DB_driver.php

    Line Number: 330

    " ------------------------------------------------- POST PARAMETERS XID f742f39c7b7eb6a233dcda1d8b4cd50ddd8e9e8b allow_comments y author 1 autosave_entry_id 0 channel_id 11 comment_expiration_date entry_date 2013-03-04 04:20 PM entry_id 27 epBwfDraft_create_draft draft|create expiration_date field_id_29

    Lorem ipsum dolor sit amet, te oratio laoreet pro. Te mei lucilius adipiscing, pro cu quas omittam. Porro debitis cu per, affert diceret petentium id vim, ut usu facete partiendo. No nec amet wisi, has facer mentitum ex, quis feugiat tibique ut mel.

    Doming iriure pericula eu qui, eu per alii dolore omnesque, choro perfecto mandamus pro no. Ea qui meliore delectus, ignota dolorem urbanitas est ad. Inermis docendi ad nam, per agam movet sensibus no. Ei nostro accommodare has. Qui aliquam laoreet petentium id.

    Sed ei sint ridens petentium, eam te nemore omittantur, scripta definitiones duo ea. Velit delicatissimi eu quo. Quod putent delenit pro ad. His possim eirmod veritus ut. Eos at falli doctus disputando.

    Ex mea esse moderatius mediocritatem. Pri ex graeco vituperatoribus, solet ignota tacimates in sit. Intellegam voluptatibus ut est. In brute dicat consul pri. Prima pertinacia ad eam, harum legendos quaerendum pri in.

    Paulo delicatissimi qui ei, cu eos omnes laboramus. Quo eu choro pertinacia. Ex agam vitae offendit eam, ut est modus salutatus, putant delectus sed ad. Vix ad sale sonet sapientem.


    Lorem ipsum dolor sit amet, te oratio laoreet pro. Te mei lucilius adipiscing, pro cu quas omittam. Porro debitis cu per, affert diceret petentium id vim, ut usu facete partiendo. No nec amet wisi, has facer mentitum ex, quis feugiat tibique ut mel.

    Doming iriure pericula eu qui, eu per alii dolore omnesque, choro perfecto mandamus pro no. Ea qui meliore delectus, ignota dolorem urbanitas est ad. Inermis docendi ad nam, per agam movet sensibus no. Ei nostro accommodare has. Qui aliquam laoreet petentium id.

    Sed ei sint ridens petentium, eam te nemore omittantur, scripta definitiones duo ea. Velit delicatissimi eu quo. Quod putent delenit pro ad. His possim eirmod veritus ut. Eos at falli doctus disputando.

    Ex mea esse moderatius mediocritatem. Pri ex graeco vituperatoribus, solet ignota tacimates in sit. Intellegam voluptatibus ut est. In brute dicat consul pri. Prima pertinacia ad eam, harum legendos quaerendum pri in.

    Paulo delicatissimi qui ei, cu eos omnes laboramus. Quo eu choro pertinacia. Ex agam vitae offendit eam, ut est modus salutatus, putant delectus sed ad. Vix ad sale sonet sapientem.

    field_id_30
    field_id_31[selections][]
    field_id_31[selections][] 14
    field_id_32 26
    filter
    layout_preview 1
    member_group[] 1
    new_channel 11
    title homepage
    url_title homepage
    versioning_enabled y


    Let me know if you need anything else.

    tks
    pete

  3. Support Staff 3 Posted by Malcolm Elswort... on 11 Mar, 2013 07:52 PM

    Malcolm Elsworth's Avatar

    Hi Pete,

    I'm sorry you are having some problems with BWF. I'll give you a little history around P&T support.

    As of version 2.5 Matrix introduced native BWF support using our API, this mean we had to remove our in-build support to avoid conflicts. While this has resulted in more robust Matrix support it did mean that support for other P&T add-ons placed WITHIN a Matrix ended.

    Assets 2 came with BWF API support which meant it now works perfectly alone or within a Matrix. At the moment Playa doesn't have this built in, but we are working with P&T and a new release is imminent.

    So a Playa within a Matrix will not work but a Playa along should. Can you clarity exactly where you are having the problem?

    Many thanks,
    Malcolm

  4. 4 Posted by Peter McDonagh on 12 Mar, 2013 10:22 AM

    Peter McDonagh's Avatar

    hi malcolm,

    no problem, thanks for getting back to me. After P&T directed me over to
    your good selves, Lisa Weiss got back to me with a playa version 4.4
    beta. I tried it and still ran into issues, so i got back to her and
    explained that I was going to develop my project with current playa
    version, and hopefully before we go live (in about 2months i'd say)
    there will be a resolution to the BWF / playa compatibility issue.
    By the way, I'm using the latest version of everything, and I was not
    placing a playa field inside a matrix field.
    It was just a simple playa relationship - see details above.

    Please keep me posted on compatibility updates and I will re-test
    tks
    pete

  5. 5 Posted by emd on 02 Apr, 2013 05:36 PM

    emd's Avatar

    I'm having the same problem:

    A Database Error Occurred
    Error Number: 1366
    
    Incorrect integer value: '' for column 'col_id' at row 1
    
    INSERT INTO `exp_ep_entry_drafts_thirdparty` (`entry_id`, `field_id`, `type`, `row_id`, `row_order`, `col_id`, `data`) VALUES ('25', '157', 'playa', '', 0, '', '98')
    
    Filename: third_party/ep_better_workflow/models/ep_third_party.php
    
    Line Number: 44
    

    It occurs when I "Discard draft" or "Save and close." "Save and preview" causes the spinner but never displays the preview. It does not appear that my Playa changes ever save.

    We're on a bit more aggressive schedule, so I'll do whatever I can to help debug this.

    EE v2.5.5
    Better Workflow v1.5.1
    Playa v4.3.3

    PHP v5.4.13
    MySQL v5.6.10
    Apache v2.2.24

  6. 6 Posted by John Karr on 02 Apr, 2013 08:43 PM

    John Karr's Avatar

    After upgrading a site running older versions to the latest versions of Playa, Better Workflow and Expression Engine we're running into the same problem. Although if we click try again on the error the preview usually does display.

  7. 7 Posted by Rob Hodges on 03 Apr, 2013 09:35 AM

    Rob Hodges's Avatar

    Hm this is a strange one,

    We are currently in the midst of working with P&T to release a fully BWF compatible version of Playa, but we have no ETA. Eric/John, what fields are you using when you get this error? Are there multiple Playa fields? Are there Playa fields in a Matrix?

    Thanks,

    Rob

  8. 8 Posted by emd on 03 Apr, 2013 11:36 AM

    emd's Avatar

    One Playa field, not in a Matrix.

    I think we were running an older version of EE, I have to check if it was upgraded prior to installing BWF and Playa, but both were installed at the same time at their current versions. Matrix is installed but not currently used in any channels.

    The Playa field is a multi-select, single channel, any category, any author, any status.

    Thanks!

    -Eric

  9. Support Staff 9 Posted by Malcolm Elswort... on 04 Apr, 2013 10:20 AM

    Malcolm Elsworth's Avatar

    Hi Guys,

    I'm really sorry about these issues.

    We have been working with P&T on improved compatibility and on April 16th there will be new versions of BWF and Playa released which will solved these problems. I hope you can muddle through until then.

    Thanks,
    Malcolm

  10. 10 Posted by Peter McDonagh on 09 Apr, 2013 02:08 PM

    Peter McDonagh's Avatar

    That's great news, thanks everyone!

  11. 11 Posted by Eric DeLabar on 18 Apr, 2013 08:17 PM

    Eric DeLabar's Avatar

    I just updated to Playa 4.4.1 and BWF 1.6, but it still doesn't work. Now I get this error when I save and close or save and preview:

    A Database Error Occurred
    Error Number: 1054
    
    Unknown column 'parent_is_draft' in 'where clause'
    
    DELETE FROM `exp_playa_relationships` WHERE `parent_entry_id` = '342' AND `parent_field_id` = '157' AND `parent_is_draft` = 1
    
    Filename: third_party/playa/ft.playa.php
    
    Line Number: 2415
    

    Thoughts?

  12. 12 Posted by Eric DeLabar on 18 Apr, 2013 08:34 PM

    Eric DeLabar's Avatar

    Actually, that was my bad, Playa was not fully upgraded, but now that it is I'm getting this:

    A Database Error Occurred
    Error Number: 1364
    
    Field 'publish_date' doesn't have a default value
    
    INSERT INTO `exp_ep_entry_drafts` (`channel_id`, `author_id`, `site_id`, `url_title`, `entry_date`, `edit_date`, `expiration_date`, `status`, `entry_id`, `draft_data`) VALUES ('4', '1', '1', 'aww-shux', 1359397535, 1366317216, 0, 'draft', '23', 'a:39:{s:10:\"channel_id\";s:1:\"4\";s:9:\"author_id\";s:1:\"1\";s:7:\"site_id\";s:1:\"1\";s:10:\"ip_address\";s:12:\"10.90.184.19\";s:5:\"title\";s:8:\"Aww Shux\";s:9:\"url_title\";s:8:\"aww-shux\";s:10:\"entry_date\";i:1359397535;s:9:\"edit_date\";i:20130418203336;s:18:\"versioning_enabled\";s:1:\"y\";s:4:\"year\";s:4:\"2013\";s:5:\"month\";s:2:\"01\";s:3:\"day\";s:2:\"28\";s:15:\"expiration_date\";i:0;s:23:\"comment_expiration_date\";i:0;s:6:\"sticky\";s:1:\"n\";s:6:\"status\";s:5:\"draft\";s:14:\"allow_comments\";s:1:\"n\";s:8:\"entry_id\";s:2:\"23\";s:17:\"autosave_entry_id\";s:1:\"0\";s:12:\"member_group\";a:1:{i:0;s:1:\"1\";}s:14:\"layout_preview\";s:1:\"1\";s:10:\"field_id_4\";s:8:\"Aww Shux\";s:10:\"field_id_6\";s:4:\"Food\";s:12:\"field_id_158\";s:12:\"Roasted Corn\";s:11:\"field_id_45\";s:130:\"
    
    Best corn on the cob ever, even Marci like it!
    
    \n\n
    \n
    Roasted Corn
    \n
    Tasty toppings on melted butter!
    \n
    \n\";s:12:\"field_id_164\";s:80:\"Best corn on the cob ever, even Marci like it! Roasted Corn with tasty toppings.\";s:11:\"field_id_87\";a:2:{i:0;s:8:\"American\";i:1;s:4:\"Corn\";}s:12:\"field_id_157\";a:1:{s:10:\"selections\";a:3:{i:0;s:0:\"\";i:1;s:3:\"200\";i:2;s:3:\"209\";}}s:11:\"new_channel\";s:1:\"4\";s:23:\"epBwfDraft_create_draft\";s:12:\"draft|create\";s:11:\"field_id_94\";s:46:\"{filedir_1}{filedir_1}roasted-corn-300x199.jpg\";s:7:\"cp_call\";b:1;s:6:\"filter\";s:44:\"YToxOntzOjEwOiJjaGFubmVsX2lkIjtzOjE6IjQiO30=\";s:6:\"author\";s:0:\"\";s:14:\"structure__uri\";s:8:\"aww-shux\";s:22:\"structure__template_id\";s:2:\"19\";s:12:\"ping_servers\";a:0:{}s:4:\"ping\";s:0:\"\";s:7:\"options\";s:0:\"\";}')
    Filename: third_party/ep_better_workflow/models/ep_entry_draft.php
    
    Line Number: 46
    
  13. 13 Posted by Rob Hodges on 19 Apr, 2013 09:37 AM

    Rob Hodges's Avatar

    Hi Eric,

    Sorry that you're having these issues. I've not see this error (or anything like it) before. I think there are three possibilities:

    1) The upgrade process failed at some point (either with BWF or Playa), leaving your DB in a strange state.
    2) You are running another add-on that is conflicting with BWF, but that hasn't caused a problem before.
    3) There is a bug in Playa/BWF, although we have not changed the code that this error is 'coming from'.

    Can you possibly back-up your database, uninstall and reinstall both Playa and BWF and see if the problem occurs?

    If this is not possible, is it possible just to reinstall BWF only (you will lose any 'live drafts' so revert them to draft or publish)

    Let us know how you get on,

    Thanks,

    Rob

  14. 14 Posted by Eric DeLabar on 19 Apr, 2013 12:03 PM

    Eric DeLabar's Avatar

    I had a backup from yesterday night, so I restored to that, which was prior to installing the plugins. I then installed the Playa update and then the BWF update. That didn't work.

    I then uninstalled both, then installed Playa and then BWF. Still returns the same error.

    Is there a hook to look for in the database to determine if there is another add-on that's conflicting?

    -Eric

  15. 15 Posted by Eric DeLabar on 19 Apr, 2013 12:37 PM

    Eric DeLabar's Avatar

    If it matters, this only appears to happen when editing an already published entry.

    E.g. If I create a new entry then save and close, everything works. If I edit that entry and save and close everything works. If I publish that entry, the next time I try to save and close it returns the error.

    It happens every time. I looked at the database, my exp_ep_entry_drafts table is empty, even when I have an entry in draft state.

    If I alter the table definition to make the publish_date field nullable, I can get it to work, but I'm not sure if that has any repercussions on the rest of the functionality... Any thoughts?

  16. 16 Posted by Rob Hodges on 19 Apr, 2013 01:06 PM

    Rob Hodges's Avatar

    Hi Eric,

    I believe this is to do with some kind of strict mode set on your database settings. You can drop that publish_date column (or nullable it) without any worry about functionality.

    Let me know how you get on,

    Thanks,

    Rob

  17. 17 Posted by Matt Everson on 28 Jan, 2015 08:26 PM

    Matt Everson's Avatar

    What's the official solution to this problem? I'm having the same issue (e.g. sections of my page aren't showing in the BW preview pane once published). The initial drafts are showing up just fine.

  18. Support Staff 18 Posted by Malcolm Elswort... on 29 Jan, 2015 04:53 PM

    Malcolm Elsworth's Avatar

    Hi Matt,

    If you are receiving the database error as described the only 'official' advice I can offer is to delete the publish_date column from the exp_ep_entry_drafts table. You can safely do with without effecting behavior.

    The error seems to be caused by a strict mode on mySQL which is quite unusual.

    I hope this works for you.

    Best wishes,
    Malcolm

  19. 19 Posted by Matt Everson on 29 Jan, 2015 07:09 PM

    Matt Everson's Avatar

    Unfortunately that didn't seem to work for me. Should my Better Workflow status group be showing duplicate statuses like this? (see attached image)

  20. 20 Posted by John Karr on 29 Jan, 2015 07:31 PM

    John Karr's Avatar



    // Please reply above this line
    ==================================================

    From: Matt Everson

    Unfortunately that didn't seem to work for me. Should my Better Workflow status group be showing duplicate statuses like this? (see attached image)

    On Thu, Jan 29 at 04:53 PM, Malcolm Elsworth wrote:

    Hi Matt,

    If you are receiving the database error as described the only 'official' advice I can offer is to delete the publish_date column from the exp_ep_entry_drafts table. You can safely do with without effecting behavior.

    The error seems to be caused by a strict mode on mySQL which is quite unusual.

    I hope this works for you.

    Best wishes,
    Malcolm

    Having trouble reading this? View this discussion online: better workflow and playa not previewing.

    Reply with #ignore to stop receiving notifications for this discussion.

  21. Support Staff 21 Posted by Malcolm Elswort... on 30 Jan, 2015 11:03 AM

    Malcolm Elsworth's Avatar

    No, that shouldn't happen.

    Can you delete one of the draft and one of the submitted statuses - this is safe to do as an entry's status is stored as a string in the database.

    I wonder if you could give me a little more detail on your exact issue. You say 'sections of my page aren't showing in the BW preview pane once published' - but when you preview you are always looking at a draft entry rather than a published version.

    Perhaps you could enable external preview in the BWF settings and send me some links to look at.

    Thanks,
    Malcolm

  22. 22 Posted by Matt Everson on 01 May, 2015 03:56 PM

    Matt Everson's Avatar

    Hi Malcolm,

    I'm coming back around to this issue and I've managed to fix some of it by rewriting the various field conditionals. This for example, will NOT output in the BWF preview pane:

     {if product_related} CONTENT {/if}
    

    I fixed it by changing it to:

     {if '{product_related:total_children}' > 0} CONTENT {/if}
    

    Fortunately, that alternative conditional exists for Playa. The only one I can't figure out now is a Channel Videos field since I have no alternative way of building the conditional. Any thoughts?

  23. Support Staff 23 Posted by Iain Bean on 07 May, 2015 11:33 AM

    Iain Bean's Avatar

    Hi Matt,

    Better Workflow uses the more long-winded syntax for conditionals. Maybe you could try formatting it something like this?

    {if '{this_thing}' != ''} SHOW THIS {/if}
    

    Best wishes,
    Iain

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac