Closed (duplicate)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Line item
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2010 at 11:34 UTC
Updated:
19 Sep 2010 at 16:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
bojanz commentedartatac, are you using the dev branch from drupal.org? Can you maybe try to install this version? I believe this is the download link.
Comment #2
rszrama commentedThis still an issue, artatac? If not, will close this out. (I get no errors on installation of any module.)
Comment #3
artatac commentedStarted again > latest verstion of D7 dev and commerce from your link.
D7 install - no issues
Commerce > commerce main module install by itself - no issue
then went back and installed rest of commerce sub modules - following error
will roll back and install sub modules one by one and report back
Comment #4
artatac commentedInstalled one by one and this was the result
views
Rules, Rules UI, Views UI, Entity Metadata, Entity CRUD API
Commerce
Price
order, line item
all ok so far...
Then try to enable Product and..
if it helps can be seen at
http://venturacottage.homedns.org/d71208/
user webmaster password demo
help yourself :-)
Comment #5
rszrama commentedAlrighty, did some debugging on installation issues. Can you get the latest versions from CVS of Views, Entity, Rules, and Commerce and try again? Following the installation order you're using I'm not getting any more notices or errors, and everything's actually being configured properly. The fixes came in through #857662: Notices when installing Product Reference.
Comment #6
artatac commentedI don't have a cvs client or use cvs. Could you zip the relevant modules and I will happily install and retry. Or if I wait a couple of days does the cvs version become the dev version on the module project page?
Comment #7
rszrama commentedYep, after tonight it'll be packaged into a new dev release here on d.o.
Alternatively you can use the "Download source" button at the top right of this page:
http://github.com/rszrama/drupalcommerce/
That's where I commit stuff as I work on it. : )
Comment #8
artatac commentedStill getting same error BUT only grabbed your cvs not Views, Entity, Rules - so will grab those and retry
Comment #9
artatac commentedStill getting same error with latest DEV versions (all but views are dated 12/8) FYI joe
Comment #10
rszrama commentedSo you're getting the "Attempt to create a field of unknown type" error? Or the wrong data type for second argument error?
Comment #11
artatac commentedYes error is second arg type
Comment #12
rszrama commentedWeird... I haven't ever seen that one. Are you running Drupal 7.0-alpha6?
Comment #13
artatac commentedNo Drupal 7 dev
See paste below
Update available
Drupal core 7.x-dev (2010-Aug-12)
Recommended version: 7.0-alpha6 (2010-Jul-09)
Download Release notes
Development version: 7.x-dev (2010-Aug-13)
Download Release notes
Includes: Bartik, Block, Color, Comment, Contextual links, Dashboard, Database logging, Field, Field SQL storage, Field UI, File, Filter, Help, Image, List, Menu, Node, Number, Options, Overlay, Path, RDF, Search, Seven, Shortcut, System, Taxonomy, Text, Toolbar, Update manager, User
Comment #14
rszrama commentedHmm, ok, could be a difference in that API function or something. Will keep an eye out for it.
Comment #15
artatac commentedIf you zip your current test site and send be a link I could install and prove it is not the current
Modules
Comment #16
rszrama commentedI wonder if it's an installation bug with Drupal itself. Can you try installing the Line Item module on its own first, then Product Reference on its own, and then Order?
Comment #17
bojanz commented#727876: Enabling modules one at a time works differently than enabling them all at once
I wonder if we're hitting a core bug here.
Comment #18
artatac commentedWill do
Comment #19
bojanz commentedDefinitely something strange in core: #877690: Cannot upgrade Drupal core if the comment module is enabled
Comment #20
bojanz commentedDouble posted accidentally.
Comment #21
artatac commentedsure..
Modules > line Item > enable
Receive message
"You must enable the Rules, Entity Metadata, Entity CRUD API, Price, Commerce modules to install Line Item."
> continue
"The configuration options have been saved." - ok so far
> Product Reference > enable
> message
"You must enable the Product module to install Product Reference."
> continue
THEN
hope that this helps
interestingly if you go into available updates commerce is not listed and but when I check back to /#overlay=admin/modules commerce, Product ref, Line item are checked see attached screen shot
Regards
Joe
Comment #22
das-peter commentedHi,
this issue is related to a change in drupal_write_record.
Instead NULL as empty value array() should be used.
Commerce uses on several locations this construct - what causes the warning:
Patch replaces all the NULL values with array()
Cheers
Peter
Comment #23
rszrama commentedThanks a lot, Peter! Joe, if that fixes it for you, I bet we can consider this issue resolved - the unknown field type errors seem to be beyond the scope of Drupal Commerce itself, and as Peter mentioned the drupal_write_record() errors are due to a change in that function that used to accept a NULL value instead of an empty array.
I've committed the patch locally and will get it pushed to CVS as soon as possible.
Comment #24
pieterdcI got the same issue, even with commerce drupal 7.x-dev and 7.x-1.0-alpha1, which include fixes from comment #22 as you state in comment #23.
But, I get no error if I firstly install the required (dependency) modules !
Thus, if I choose to install, let's say commerce_cart (after installing only the commerce base module), I get the question if I want to install the required modules (commerce_checkout, commerce_ui, commerce_order, rules, entity_metadata, entity, commerce_line_item, commerce_price, commerce_product, commerce_product_reference, views, commerce_cart)
I agree.
And then I get : FieldException: Attempt to create a field of unknown type commerce_line_item_reference. in field_create_field() (line 297 of /drupal-7.x-dev/modules/field/field.crud.inc).
But, if I firstly install rules, entity and views before I install commerce_cart; no errors appear.
So, it seems to me as it's problem with the order of installing dependent modules.
Comment #25
rszrama commentedCool, thanks for the thorough testing. I'm guessing we need to wait on the issue bojanz mentioned in #17 to go in.
Comment #26
artatac commentedDownloaded and installed the latest d7alpha (released today) and latest commerce etc. Can confirm all installed ok and have created first product via #overlay=admin/commerce/products/add/product. This allowed me to add sku, title and price. save and showing.
Then used #overlay=admin/commerce/products/types/product/fields to add and (existing) image field > went into the first product and added an image
so product exists at /commerce/products/1#overlay=admin/commerce/products/1 but cant see how to 'view/buy' it? I also presume that like the image field you add a cck text description field if you need it?
also /1#overlay=admin/content shown no content despite my toy teddy, is this because product is not a node type anymore?
demo site at
http://venturacottage.homedns.org/d70309/user
logon: wembaster password demo
Comment #27
artatac commentedfamouse last words - working fine as above > realised I had not added Address_field and enabled customer - so did this and got
Comment #28
rszrama commentedAhh, nice - didn't know there was a new alpha. : )
Will have to catch up now to take advantage of display formatter settings... Obviously look like core still has a problem.
Comment #29
tcmug commentedI double #24; I left commerce_cart for last and it worked without any problems.
Previous attempts with auto enabling commerce_cart gave me various errors depending on which module(s) I had left disabled.
/tcmug
Comment #30
rszrama commentedI'm going to mark this a duplicate and point to the issue with a full explanation and attempted patch. No point keeping this one alive any more.
See: #906668: Installation fails when all modules are enabled at once - FieldException errors