简体   繁体   English

解析:TypeError:无法在main.js:7:37调用未定义的方法“ split”

[英]Parse: TypeError: Cannot call method 'split' of undefined at main.js:7:37

I am trying to save a ParseObject with a server-created field of "arrWords". 我正在尝试使用服务器创建的“ arrWords”字段保存一个ParseObject。 However, I keep getting an error of 但是,我不断收到一个错误

TypeError: Cannot call method 'split' of undefined at main.js:7:37

This error occurs both on my server-side code using the Parse provided SDK and in the Parse Dashboard when entering the value 输入值时在使用解析提供的SDK的服务器端代码解析仪表板中均会发生此错误。

["test","test2"]

for the arrWords array. 用于arrWords数组。

My code is simple: 我的代码很简单:

$query = new \Parse\ParseQuery("Post");
$object = $query->first();
$object->setArray("arrWords", ["test", "test2"]);
$object->save();

The same errors occurs with setArray(), setAssociativeArray(), and add(). setArray(),setAssociativeArray()和add()也会发生相同的错误。

Notes: 笔记:

  • My Post table has over 900,000 rows 我的帖子表有超过900,000行
  • Replicating the above steps on a new Object/Table works just fine (no JS error) 在新的对象/表上复制上述步骤就可以了(没有JS错误)

Is this due to the size of my table and / or a Parse system issue? 这是由于表的大小和/或解析系统问题引起的吗? Or am I doing something wrong? 还是我做错了什么?

It seems to be an issue with Parse and how they handle large data sets. 解析以及它们如何处理大数据集似乎是一个问题。 I've found a work-around from the Parse Dashboard that suits my needs for now. 我已经从“解析仪表板”中找到了一种适合我目前需要的变通方法。

  1. Log in to Parse 登录解析
  2. Bring up the Parse Core dashboard 调出Parse Core仪表板
  3. Select Import 选择导入
  4. Drag and drop a JSON file with the data to import 拖放带有要导入数据的JSON文件
  5. Type your Object / Table / Class 键入您的对象/表/类
  6. Wait for the import to finish. 等待导入完成。 The new row will be added. 新行将被添加。

Tips on JSON format for Parse Import 解析导入的JSON格式提示

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TypeError:无法调用未定义的方法“ split” - TypeError: Cannot call method “split” of undefined 未捕获的TypeError:无法调用未定义的方法“ split” - Uncaught TypeError: Cannot call method 'split' of undefined 类型错误:无法在 SuiteScript 中调用未定义的方法“拆分” - TypeError: Cannot call method "split" of undefined in SuiteScript 未捕获的类型错误:无法读取 main.js:48 处未定义的属性“渲染” - Uncaught TypeError: Cannot read property 'render' of undefined at main.js:48 main.js:114 未捕获类型错误:无法设置未定义的属性“incart” - main.js:114 Uncaught TypeError: Cannot set property 'incart' of undefined main.js:1 错误类型错误:无法读取 null 的属性“querySelectorAll” - main.js:1 ERROR TypeError: Cannot read property 'querySelectorAll' of null 无法读取main.js中未定义的属性“ substr” - Cannot read property 'substr' of undefined in main.js error =“ TypeError:对象[object Object]在main.js:33:12处没有方法'addUnique'\\ n”; 云代码parse.com - error = “TypeError: Object [object Object] has no method 'addUnique'\n at main.js:33:12”; Cloud code parse.com 解析失败:TypeError:无法调用未定义的方法'get' - Parse Failed with: TypeError: Cannot call method 'get' of undefined TypeError:无法在Object.Parse.File.save调用未定义的方法'then' - TypeError: Cannot call method 'then' of undefined at Object.Parse.File.save
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM