Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Meteor 无法获取autoform 6.0以使用现有数据填充_Meteor_Meteor Blaze_Meteor Autoform_Simple Schema - Fatal编程技术网

Meteor 无法获取autoform 6.0以使用现有数据填充

Meteor 无法获取autoform 6.0以使用现有数据填充,meteor,meteor-blaze,meteor-autoform,simple-schema,Meteor,Meteor Blaze,Meteor Autoform,Simple Schema,我已经更新到简单模式npm并安装了autoform 6.0,但是我似乎无法成功为集合生成表单。我在template helper:TypeError:无法读取未定义的属性“mergedSchema”中遇到此错误异常,我不知道它指的是什么,因为这是一个新版本,所以它不应该引用任何旧的自动表单或简单架构包 路径:imports/ui/pages/candidate registration/contact information/contact information.html <templa

我已经更新到简单模式npm并安装了autoform 6.0,但是我似乎无法成功为集合生成表单。我在template helper:TypeError:无法读取未定义的属性“mergedSchema”中遇到此错误
异常,我不知道它指的是什么,因为这是一个新版本,所以它不应该引用任何旧的自动表单或简单架构包

路径:
imports/ui/pages/candidate registration/contact information/contact information.html

<template name="App_contactInformation">
  {{#with profile}}
    {{firstName}}
      {{> quickForm collection=Profile id="updateProfile" type="update"}}
    {{/with}}
  {{/if}}
</template>
路径:
imports/api/profile/server/publications.js

import { Profile } from '/imports/api/profile/profile.js';
import './contact-information.html';

Template.App_contactInformation.onCreated(function () {
  this.autorun(() => {
    this.subscribe('private.profile');
  });
});

Template.App_contactInformation.helpers({
  profile() {
    var user = Profile.findOne({userId: Meteor.userId()});
    return user;
    }
});
// All profile-related publications

import { Meteor } from 'meteor/meteor';
import { Profile } from '../profile.js';

Meteor.publish('private.profile', function() {
  if (!this.userId) {
    return this.ready();
  }
  return Profile.find({"userId": this.userId});
});

确保您也在使用 而且有。例如

Books.attachSchema(Schemas.Book);

您有
{>quickForm collection=Profile id=“updateProfile”type=“update”}
collection=Profile(大写
P
和方法Profile()可以吗在模板中,helpers有一个小写的
p
?另一件事是,您需要确保在客户端代码中导入
imports/ui/pages/candidate registration/contact information/contact information.js,而不是
.html
文件。否则,模板代码将不会运行,并且“集合”属性中的“自动表单”将无法使用帮助程序
Profile