Hello I am getting this error when going to the pledge page :
EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. in EntityDrupalWrapper->set() (line 736 of /Library/WebServer/Documents/campaignia/sites/all/modules/entity/includes/entity.wrapper.inc).
I have setup a crowfunding project with one reward besides the "no reward". Everything displays fine (rewards local task and contributions etc) but when clicking the reward to go to pledge page on the node it gives this message. I believe somehow related to Commerce line item.
Do you have an idea what it might be and how to bypass it?
Best regards,
Joao Garin
Comments
Comment #1
joaogarin commentedJust posting some pics here. Still trying to figure out what the issue is.
Url is : crowdfunding/pledge/39/2
I added a new crowdfunding project and the went to store -> add products and added two Rewards for this product.
Comment #2
joaogarin commentedI think there is some issue with my setup. As I dont see anything to create rewards on the "Rewards" local task.
"On each crowdfunding project page, you'll see a local task(on the tabs, like "Edit") called "Rewards", where you can create the rewards for it". Is this supposed to have some sort of button to create rewards?
Also when you mention :
Rewards - a new Commerce Product Type that specify a reward for the ones who choose it(and pay AT LEAST the product original price)
I think the problem is I have line items (the rewards) which are not linked to any main product..
Reviewing the steps to set it up :
The basic workflow is:
1 - Create a crowdfunding project at "/node/add/crowdfunding-project" - OK
2 - On each crowdfunding project page, you'll see a local task(on the tabs, like "Edit") called "Rewards", where you can create the rewards for it - I dont see this option to create the rewards so what I did was go to store -> create product and created a "Crowdfunding reward". This seems to create a line item associated with my crowdfunding project but not really linked to a main product. Is this correct?
after that :
3 - Each Reward will be show as a link on the crowdfunding project page, that on click, the use will be redirected to a "Pledge selection" page(maybe the user wants to contribute an amount different than the default ones from the rewards).
I do see them listed on the project page, but clicking on them gives me this error..
Comment #3
tabestan commentedI agree, the link to create new rewards is gone in 7.x-1.x-dev.
Comment #4
joaogarin commentedWell, Actually I tried both versions. Non of which worked for me.
Still waiting on how to deal with it just to at least make the smallest of use cases. Right now I can not try it even =/ Any chance you can take a look Pedro? Or just point in the right direction.
Comment #5
tabestan commentedIs there any updates on this ?
Comment #6
briganzia commentedHi,
I have the same problem at line 736. Tried both versions, alpha and dev.
Comment #7
joaogarin commentedHello Pedro,
Think you will have some time to look into this? Would love to start using it to be able to be a bit more helpful
Comment #8
briganzia commentedHi, I discovered an error in path in crowfunding.module,
at line 259 instead
if ($router_item['path'] == 'node/%/crowdfunding/rewards') {
use
if ($router_item['path'] == 'node/%/crowdfunding-rewards') {
now a Create Crowdfunding reward link appears under reward tab.
Anyway it fails again the link to pledge!
Comment #9
joaogarin commentedYes I was able to create the rewards through the store backoffice (commerce products)..but then failed going to the pledge page this is where I could not find much more.
Comment #10
briganzia commentedI've found one more error, I think.
Under crowdfunding/lib/Drupal/crowdfunding/FormControllers/PledgeSelection.php
line 22: $project_id = $args[0];
use instead
$project_id = $args[2];
Now you should view pledges.
Comment #12
pedrorocha commentedThanks for the help @briganzia! Fixes already commited and available in the -dev version.
Comment #13
pedrorocha commented