apostrophecms / apostrophe-sandbox

This sandbox site is the basis for our live demo. For your own projects, you can use apostrophe-boilerplate as a more streamlined, cleaner point of departure via the apostrophe-cli tool.
MIT License
112 stars 41 forks source link

Issues adding and editing images #60

Closed lance-p closed 8 years ago

lance-p commented 8 years ago

The add image to page seems to behave erratically. For example, I have these images in the Images "library" section (Apos admin bar > Images):

ss3

I then try to add one of these images to a page:

ss1

but the "Choose Images" modal shows no images (no results for current filters with no filter criteria).

ss2

Why can't I select an image from the list of images already added to the image "library"?

Also, if I try directly adding the image to the page using "New Image", the image won't save and there is no error thrown in console. I add the image, title it, select published=yes and click Save Image button, but the "Choose Images" modal is empty, however, the page shows the "Edit Image" button, even though the image isn't displayed on the page or in the "Choose Image" modal.

ss4

(clicking the "Edit Image" button shows the empty "Choose Image" modal)

ss2

lance-p commented 8 years ago

Looks like the widget had a minSize attribute, which was the source of the issue. Removing it resolved the issue.

{{ apos.area(data.piece, 'main', { widgets: { 'apostrophe-rich-text': { toolbar: [ 'Styles', 'Bold', 'Italic', 'Blockquote', 'Link', 'Anchor', 'Unlink', 'Table', 'BulletedList', 'NumberedList' ], styles: [ { name: 'Title', element: 'h3' }, { value: 'h5', label: 'Subtitle' }, { name: 'Paragraph', element: 'p' } ] }, 'apostrophe-images': { minSize: [ 700, 350 ], aspectRatio: [ 2, 1 ], size: 'full' }, 'apostrophe-video': {} } }) }}

boutell commented 8 years ago

Were the images large enough to meet that requirement? If so, there could still be a bug here.

On Tue, Nov 8, 2016 at 4:43 PM, Lance P. notifications@github.com wrote:

Looks like the widget had a minSize attribute, which was the source of the issue. Removing it resolved the issue.

{{ apos.area(data.piece, 'main', { widgets: { 'apostrophe-rich-text': { toolbar: [ 'Styles', 'Bold', 'Italic', 'Blockquote', 'Link', 'Anchor', 'Unlink', 'Table', 'BulletedList', 'NumberedList' ], styles: [ { name: 'Title', element: 'h3' }, { value: 'h5', label: 'Subtitle' }, { name: 'Paragraph', element: 'p' } ] }, 'apostrophe-images': { minSize: [ 700, 350 ], aspectRatio: [ 2, 1 ], size: 'full' }, 'apostrophe-video': {} } }) }}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/punkave/apostrophe-sandbox/issues/60#issuecomment-259268963, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB9fa9wyjCVby6QcTngzZis-Uw4drMnks5q8O0IgaJpZM4KrkoE .

THOMAS BOUTELL, SUPPORT LEAD P'UNK AVENUE | (215) 755-1330 | punkave.com

lance-p commented 8 years ago

It looks like it is working to spec. If I find any issue, I'll reply to this thread. Thanks.