apostrophecms / apostrophecms/apostrophe

apostrophe-schemas: Unable to edit page displayed in chooser withType apostrophe-page, although edit button exists

Open
#1,350 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
4.6k
Forks
650
Avg merge
19h 21m
Merged PRs (30d)
23

Description

Every time I click "Edit" on a page item, a javascript error occurs. Node.js and Apostrophe are up to date. My module:

index.js
```js
module.exports = {
extend: 'apostrophe-widgets',
label: 'Menu',
addFields: [
{
name: '_pages',
type: 'joinByArray',
withType: 'apostrophe-page',
label: 'Page',
required: true,
filters: {
projection: {
title: 1,
slug: 1
}
}
}
]
};
```

widget.js
```nunjucks

```

![capto_capture 2018-05-02_06-02-49_pm](https://user-images.githubusercontent.com/34842497/39534982-128fcd5c-4e33-11e8-8bdb-25c3e1b9aca0.png)

Contributor guide

Open the contributing guide

Research direction

Start with the joinByArray field in index.js and the page loop in widget.js, then reproduce the issue by selecting a page item and clicking Edit. Trace the resulting JavaScript error and verify that pages selected through the apostrophe-page chooser can be edited while the widget still renders their URLs and titles.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.