dotCMS / dotCMS/core

Import Content: "Click here to download a CSV sample file" link is broken - no sample CSV can be downloaded

Open
#37,461 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OKR : Customer Support Team : Maintenance Type : Defect
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem

In the Content → Import Content portlet, the link "Click here to download a CSV sample file" is broken. Clicking it does not download any file — the browser navigates to a Liferay/Struts URL that fails to resolve and renders Chrome's "webpage might be temporarily down or it may have moved permanently to a new web address" error page.

This blocks the documented starting point for a CSV content import: users have no reference file showing the expected column headers for the selected Content Type.

Steps to Reproduce

  1. Log in to dotAdmin (reproduced on demo.dotcms.com).
  2. Go to Content → Search and open the Import Content screen (/dotAdmin/#/c/content?mId=71b8...).
  3. Click "Click here to download a CSV sample file".

Expected Behavior

A sample CSV file is downloaded, containing the header row for the selected Content Type / language.

Actual Behavior

No file is downloaded. The browser leaves dotAdmin and lands on an error page for a URL of the form:

/c/portal/layout?p_l_id=71b8a1ca-37b6-4b6e-a43b-...&p_p_id=content&p_p_action=1&p_p_state=maximized
  &angularCurrentPortlet=content&p_p_mode=view
  &_content_struts_action=%2Fext%2Fcontentlet%2Fimport_contentlets&_content_cmd=...

Note the link also assumes the legacy portal/Struts navigation, so it breaks out of the Angular admin shell instead of triggering a download in place.

Notes / Possible Cause

The sample-CSV action still points at the legacy /c/portal/layout + _content_struts_action=/ext/contentlet/import_contentlets endpoint. It looks like either the endpoint no longer resolves or the required parameters are no longer being built correctly from the Angular portlet, so the request 404s instead of returning the CSV.

Worth confirming whether the sample download should be reimplemented as a direct REST/servlet download (e.g. returning text/csv with Content-Disposition: attachment) so it works independently of the portal layout URL.

Environment

  • Instance: demo.dotcms.com
  • Browser: Chrome (macOS)
  • Portlet: Import Content (Content Search)

Screenshots

  1. Import Content screen with the "Click here to download a CSV sample file" link.
  2. Error page shown after clicking the link.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Import Content screen's sample CSV link and trace its legacy /c/portal/layout request with _content_struts_action=/ext/contentlet/import_contentlets. Confirm how the selected Content Type and language are passed, then verify that clicking the link downloads a CSV with the expected header row without leaving the Angular admin shell.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, java
Domain
backend, content
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.