0
내가 같이 updateSingleValue 사용하고 올바른 :updateSingleValue는()가 false를 돌려, 아직 입력
$updated = $this->app['storage']->updateSingleValue('suggestions', $id, 'votes', $value);
$id
및 $value
제대로 (I 수동 정수를 해결하도록 설정 한 경우에도)를 설정하고,이 확실히 suggestions
콘텐츠 유형이 votes
필드로 존재합니다. 그러나이 함수는 false
을 반환하므로 !$this->isValidColumn($field, $contenttype)
이 실패 함을 나타냅니다.
JSON 형식의 suggestion
은 다음과 같습니다
suggestion": {
"id": "25",
"values": {
"datechanged": "2015-01-03 13:25:02",
"id": "25",
"slug": "slug-o2sbdb",
"datecreated": "2015-01-03 13:25:02",
"datepublish": "2015-01-03 13:25:02",
"datedepublish": "1900-01-01 00:00:00",
"ownerid": "1",
"status": "published",
"title": "test title",
"description": "test description",
"votes": "0"
},
제안의 컨텐트 유형은 다음과 같습니다
suggestions:
name: Suggestions
slug: suggestions
singular_name: Suggestion
singular_slug: suggestion
default_status: publish
fields:
title:
label: Title
type: text
class: large
required: true
pattern: ".{2,255}" # see: http://html5pattern.com/
error: "The Title field is required, and must contain at least 2 characters"
description:
label: Description
type: textarea
votes:
label: Votes
type: integer
내가 잘못 여기서 뭘 할 수 있습니까?