Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
asin.module lines 263 and 270 each consist of:
'extra' => array(array('field' => 'etid', 'value' => _field_sql_storage_etid($entity), 'numeric' => TRUE)),
Method "_field_sql_storage_etid" doesn't seem to exist, resulting in a PHP error when attempting to visit the views administration page. I don't know enough to know whether these lines matter so I'm uncommenting them locally and I'll see how it goes :)
Comment | File | Size | Author |
---|---|---|---|
#31 | relationships.JPG | 64.31 KB | PILIMILI |
#15 | amazon.hook_views_data_1011280_15.patch | 8.86 KB | rfay |
#14 | 1011280-refactor-views_data.patch | 8.72 KB | dawehner |
Comments
Comment #1
rfayHave you run update.php yet?
I'll be surprised if this has had an impact on ASIN module, but #986992: Insane etid / {field_config_entity_type} abstraction was a signficant change and resulted in lots of update issues.
Comment #2
jdleonardYes, I ran updates. I'm using d7 rc4.
Comment #3
rfayI can't recreate this with a simple experiment. I have emptied amazon_item table and cleared cache and edited and created new amazon items.
Please provide an exact technique to create this error. and test with current dev and current Drupal 7. Please test with a clean D7 if you can as well.
Comment #4
jdleonardI am using a lot of other modules so it may be related to them. I don't have a need for the ASIN module anymore, so I'll let this rest. Thanks for your time!
Comment #5
kahta CreditAttribution: kahta commentedi ran into the same problem as above.
"Fatal error: Call to undefined function _field_sql_storage_etid() in [...] /sites/all/modules/amazon/asin/asin.module on line 263"
error occurs when i open the views configuration page.
i am using 7.0 and views 7.x-3.0-alpha1
Comment #6
jmickelaI also have this problem.
Just did a clean install of D7 and all modules I'm using, added some items, tried to access views and got this error.
Comment #7
rfayAll, we certainly want to solve this.
Please provide the exact views module you're using, and attach a sample exported CCK type and a sample exported view.
Comment #8
kahta CreditAttribution: kahta commented$fields['node-comic-field_amzn_link'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_amzn_link',
'foreign keys' => array(),
'indexes' => array(),
'module' => 'asin',
'settings' => array(),
'translatable' => '1',
'type' => 'asin',
),
'field_instance' => array(
'bundle' => 'comic',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'asin',
'settings' => array(),
'type' => 'large',
'weight' => '1',
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_amzn_link',
'label' => 'Amazon',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 0,
'module' => 'asin',
'settings' => array(),
'type' => 'asin_text',
'weight' => '-3',
),
),
);
can't access views.
Comment #9
mqx66 CreditAttribution: mqx66 commentedafter amazon field enabled, if I want to access Views, there is a blank page with following message:
Fatal error: Call to undefined function _field_sql_storage_etid() in /home/....../sites/all/modules/amazon/asin/asin.module on line 263
but Amazon along does not cause problem.
Thanks
Comment #10
dwaine CreditAttribution: dwaine commentedMy site experienced this same error when I added Views version 7.x-3.x-dev to D7 version 1.0. Removing the dev version of Views and then installing Views version 7.x-3.0-alpha1 rectified the problem. My site does not utilize the Amazon module.
I don't know if my issue is the same as the one affecting the Amazon module but thought the solution might help track down the cause. Good luck.
Comment #11
rfayIs it possible this is just a views problem?
Comment #12
rfayI am able to recreate this problem:
The problem seems to be that hook_views_data() needs to be reworked somehow. I'll try to check in with dereine about this.
Comment #13
rfaydereine's suggestion in IRC:
Comment #14
dawehnerBasically see the todo in asin.module :)
Checked out a old version of views and made a diff between the codepart of asin and the codepart of views.
The result for me is that the only difference is
a) the relationship to the column_name
b) the relationship via the delta
Everything else are bugfixes in views.
So based on this i removed the data and filled in the two relationships.
This isn't tested yet :(
Sadly i have no idea how to setup all this, but my IDE showed me that every variable, which is used in this code, is defined.
Mh the diff is really hard to understand! It's much better if you apply the patch and see the output.
Comment #15
rfayThis one is based on your instructions (and taxonomy_field_views_data() in taxonomy.views.inc) but not on #14. It seems to work ok, but I haven't thoroughly tested it. Would be interested in your feedback, @dereine.
#14 has some problems with using variables that haven't been defined, so doesn't work out of the box, and you were making it while I was doing this one on the plane.
I don't understand what the
stuff is. Is that necessary?
Comment #16
rfayComment #17
TomSherlock CreditAttribution: TomSherlock commentedPlease ignore this comment.
Comment #18
rfay@TomSherlock, you probably have an old views module. Please upgrade to the latest views. Your issue will be caused by the same Drupal core code change, but not be related to Amazon.
Comment #19
TomSherlock CreditAttribution: TomSherlock commentedThanks for the immediate reply.
Actually it was more basic than that: after updating from rc1 to 7.0 I also began updating views. But never finished it. So when I went back to it, I forgot. The old views folder had been removed and the compressed archive for the new views folder had not yet been unpacked. So, carelessness on my part.
Comment #20
dawehnerNo idea, but i just had this code, so i thought it was there by intention.
Comment #21
kahta CreditAttribution: kahta commentedthanks :)
amazon.hook_views_data_1011280_15.patch
works for me
Comment #22
rfayMarked #1030276: Call to undefined function _field_sql_storage_etid() on visiting admin/structure/views as duplicate
Comment #23
rfayOK- I committed this one because it's critical, https://drupal.org/cvs?commit=485270
But I haven't personally tested a number of things yet, and would appreciate if you could all test the dev release when it's built shortly.
Things that need to be tested:
Ordinary views using no relationships
Nodes with relationships to amazon item (testing all types of field)
Views of amazon items (testing all types of fields)
Comment #25
zabelc CreditAttribution: zabelc commentedI hate to say it but I just got an auto-update to the Amazon module (7.x-1.0-beta4 dated 2011-02-07), and this error reappeared.
That said the patch killed it, so perhaps the patch was accidentally overwritten in CVS.
Comment #26
rfay@zabelc, there has been no new release of Amazon since December, so this fix isn't in anything but the dev release. If you got an "auto-update" dated 2011-02-07, then there's something wrong with the update system, and we should file a bug against that. I'm setting back to fixed, but interested in what happened. See the releases on http://drupal.org/project/amazon.
That said, it *is* time for a release.
Comment #27
PILIMILI CreditAttribution: PILIMILI commentedI am still working on installing amazon I had tray on drupal 7.x-1.0 beta4 when selecting: structure and then views i get the following error
Fatal error: Call to undefined function _field_sql_storage_etid() in C:\wamp\www\drupal-7.0 Rosa\sites\all\modules\amazon\asin\asin.module on line 263
and in drupal 7.x dev when i get to views to set up relationships (I am Using Views 7.x.-3 x dev)
the option content amazon_item is not there What info you need i do not have clear what you mean by content type and the view.
Comment #28
rfayThe etid fix was committed... Sorry that we haven't made a new release yet. We'll have one coming soon. In the meantime, please use the dev release.
Comment #29
PILIMILI CreditAttribution: PILIMILI commentedWhen you say use the dev release are you referring to Drupal 7.x dev if this is the case how i can fix the module views to set up relationships (I am Using Views 7.x.-3 x dev)
the option content amazon_item is not there.
please let me know what i can do to fix it
Comment #30
rfayAmazon 7.x-1.x-dev
Comment #31
PILIMILI CreditAttribution: PILIMILI commentedFor the issue before I am using Amazon 7.x-1.x-dev where i can not set in views the relationship because content amazon_item
is no available (please see the picture attached )
Comment #32
rfayIt's called field_amazon here and it's in your screenshot...
Comment #33
PILIMILI CreditAttribution: PILIMILI commentedThanks