decaporg / decaporg/decap-cms

Collection label disappears when value is too long

Open
#7,532 0 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**
I have a collection named "config" that contains URLs in each field. These are all defined as (string) value.
When these URLs reach a certian length (50 characters) the label disappears from the "Preview" panel on the right.

**To Reproduce**
Steps to reproduce the behavior. For example:
1. Go to an admin interface
2. Provide a URL as a value for a string field that is more than 50 characters
3. look at the preview pane to the right
4. Note that the labels are missing

**Expected behavior**
Labels should be visible

**Screenshots**

Preview with long URLs
Image

Same page, only shortened the values:
Image

**Applicable Versions:**

- Decap CMS version: [e.g. 2.0.4]
- Git provider: github
- OS: Mac OS, Linux
- Browser version: all
- Node.JS version: 18

**CMS configuration**

config.ts

import { CollectionMenus } from './collections/CollectionMenus';

import { CollectionCategory } from './collections/CollectionCategory';
import { CollectionIndicator } from './collections/CollectionIndicator';
import { CollectionMorePages } from './collections/CollectionMorePages';
import { CollectionCharts } from './collections/CollectionCharts';
import { CollectionMaps } from './collections/CollectionMaps';
import { CollectionTargets } from './collections/CollectionTargets';
import { CollectionConfig } from './collections/CollectionConfig';

export const getConfig = () => {
const config = {
editor: {
preview: true,
},
cms_manual_init: true,
backend: {
name: 'git-gateway', // git-gateway | test-repo
branch: process.env.NEXT_PUBLIC_CMS_BRANCH,
squash_merges: true,
},
load_config_file: false,
media_folder: 'public/uploads/',
public_folder: '/uploads',
collections: [
CollectionMenus,
CollectionCategory,
CollectionIndicator,
CollectionMorePages,
CollectionCharts,
CollectionTargets,
CollectionMaps,
CollectionConfig,
],
};

const isLocalBackend = process.env.NEXT_PUBLIC_LOCAL_BACKEND === 'TRUE';

if (isLocalBackend) {
// See https://decapcms.org/docs/working-with-a-local-git-repository/#configure-the-decap-cms-proxy-server-port-number
Object.assign(config, {
local_backend: {
url: 'http://localhost:8081/api/v1',
allowed_hosts: ['192.168.0.1'],
},
});
}

return config;
};

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.