Dspace 7 Simple Item page customization guide needed

141 views
Skip to first unread message

Rupinder Singh

unread,
Oct 3, 2024, 4:02:59 AM10/3/24
to dspac...@googlegroups.com, dspace-c...@googlegroups.com
Hi all, 
I have installed Dsapce 7.6 on my server and have migrated my data. It is an all-default installation with no customization in the theme or in the metadata elements. 
Now, in my simple item view of dspace, I want to have a metadata field (dc.identifier.url) field. This field is otherwise visible in the full item view, but I want to have it in simple page view. 


I tried copying the untyped item folder from the custom theme folder into my dspace theme folder. and I have edited untyped-item.component.html file with the following configuration to add dc.identifier.url element , just like the other elements
      <ds-item-page-url-field [item]="object"
      [fields]="['dc.identifier.url']"
      [label]="'item.page.url'">
    </ds-item-page-url-field>

and with this we have edited untyped-item.component.ts file with following configuration
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { Item } from '../../../../core/shared/item.model';
import { ViewMode } from '../../../../core/shared/view-mode.model';
import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator';
import { ItemComponent } from '../shared/item.component';

/**
 * Component that represents a publication Item page
 */


// MAKE SURE that the final parameter here is the name of your theme. This one assumes your theme is named "custom".
@listableObjectComponent(Item, ViewMode.StandalonePage, Context.Any, 'custom')
@Component({
  selector: 'ds-untyped-item',
  // If you want to modify styles, then...
  // Uncomment the styleUrls which references the "untyped-item.component.scss" file in your theme's directory
  // and comment out the one that references the default in "src/app/"
  styleUrls: ['./untyped-item.component.scss'],
  //styleUrls: ['../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component.scss'],
  // If you want to modify HTML, then...
  // Uncomment the templateUrl which references the "untyped-item.component.html" file in your theme's directory
  // and comment out the one that references the default "src/app/"
  templateUrl: './untyped-item.component.html',
  //templateUrl: '../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component.html',
})
export class UntypedItemComponent extends ItemComponent {

}


but after making this changes, when I run the sudo yarn run build:prod command . 
it throws following error. and the dspace UI gives error 500.
Warning: /home/jesse/dspace-angular/src/themes/custom/app/shared/starts-with/date/starts-with-date.component.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: /home/jesse/dspace-angular/src/themes/custom/app/shared/starts-with/text/starts-with-text.component.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: /home/jesse/dspace-angular/src/themes/custom/app/workspace-items-delete-page/workspace-items-delete/workspace-items-delete.component.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.



./src/themes/dspace/app/item-page/alerts/item-alerts.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/alerts/item-alerts.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/themes/dspace/app/item-page/edit-item-page/item-status/item-status.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/edit-item-page/item-status/item-status.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/themes/dspace/app/item-page/full/field-components/file-section/full-file-section.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/full/field-components/file-section/full-file-section.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/themes/dspace/app/item-page/full/full-item-page.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/full/full-item-page.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/themes/dspace/app/item-page/media-viewer/media-viewer-image/media-viewer-image.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/media-viewer/media-viewer-image/media-viewer-image.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/themes/dspace/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/themes/dspace/app/item-page/media-viewer/media-viewer.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/media-viewer/media-viewer.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/themes/dspace/app/item-page/simple/field-components/file-section/file-section.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/simple/field-components/file-section/file-section.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/themes/dspace/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/themes/dspace/app/item-page/simple/item-page.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/simple/item-page.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

./src/themes/dspace/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/jesse/dspace-angular/src/themes/dspace/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 

Please help me with this if anyone has faced the same problem or if anyone has added a metadata field in the simple item view of dspace. Any video tutorial or a Blog with precise steps would be helpful. 
please do not send a generic dspace wiki link because, unfortunately, that is useless. 

Thank You
Rupinder Singh
Screenshot 2024-09-19 181746.png
Screenshot 2024-09-19 180320.png
Screenshot 2024-09-19 181719.png
Screenshot 2024-09-19 181739.png
Reply all
Reply to author
Forward
0 new messages