4

I'm implementing DXA(Tridion Reference Implementation).

I publish CSS files and some image files by "HTML Design".But when there are binary files with same name, and they are to be published to different directory, following error occurs on content deployer.

All binary files are published as Variants of 1 multimedia component(HTML Design) and file name is used as variant ID, so this error occurs even if those files are published to different directory. Is there any way to publish same name files to different directory?

2015-05-08 16:48:06,701 ERROR DeployPipelineExecutor - Original stack trace for transaction: tcm:0-2104-66560
com.tridion.deployer.ProcessingException: Binary variant [Binary id=tcm:67-2444-16 variantId=dist-reset.css sg=tcm:67-686-4 path=\jp\ja\system\assets\css\reset.css] is published into multiple structure groups (tcm:67-744-4), which is not allowed
    at com.tridion.deployer.modules.BinaryDeploy.processSection(BinaryDeploy.java:114) ~[cd_deployer.jar:na]
    at com.tridion.deployer.SectionVisitor.process(SectionVisitor.java:60) ~[cd_deployer.jar:na]
    at com.tridion.deployer.modules.BinaryDeploy.process(BinaryDeploy.java:89) ~[cd_deployer.jar:na]
    at com.tridion.deployer.Processor.process(Processor.java:109) ~[cd_deployer.jar:na]
    at com.tridion.deployer.workers.ProcessorWorker.doWork(ProcessorWorker.java:77) ~[cd_deployer.jar:na]
    at com.tridion.deployer.phases.ProcessingPhase.execute(ProcessingPhase.java:73) ~[cd_deployer.jar:na]
    at com.tridion.deployer.phases.DeployPipelineExecutor.runMainExecutePhase(DeployPipelineExecutor.java:198) [cd_deployer.jar:na]
    at com.tridion.deployer.phases.DeployPipelineExecutor.doExecute(DeployPipelineExecutor.java:100) [cd_deployer.jar:na]
    at com.tridion.deployer.phases.DeployPipelineExecutor.execute(DeployPipelineExecutor.java:64) [cd_deployer.jar:na]
    at com.tridion.deployer.TransactionManager.handleDeployPackage(TransactionManager.java:82) [cd_deployer.jar:na]
    at com.tridion.deployer.queue.QueueLocationHandler$1.run(QueueLocationHandler.java:180) [cd_deployer.jar:na]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.7.0_45]
    at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_45]
    at java.lang.Thread.run(Unknown Source) [na:1.7.0_45]

Regards,

1 Answer 1

3

This is because, as you've identified, the component ID is the same and the file name is being used as the variant ID. Tridion won't allow you to publish the same variant of the same component to multiple places (It doesn't know that the actual content is different in this case). Without modifying the templates responsible for publishing to include something else in the variant ID (path?) then you'll probably need to change the second file's name.

Adding the path to the variant ID could be a nice modification... Why not fork the project, make the change and submit a pull request? ;)

7
  • @Hirokazu adding the path to the variant ID will also not work I'm afraid, you really have to make the filename unique in this situation. Or consider deploying your design as part of the Web Application and not publishing it. May 8, 2015 at 11:37
  • @BartKoopman why will adding the path to the Variant ID not work? It will make it a different variant for the different file, will it not? If they're published to different SGs then there shouldn't be a clash May 8, 2015 at 11:40
  • if I remember correctly slashes in the filename are not accepted, and if it does I wonder how well that works with the broker retrieval of the assets in this situation. But you are right, it can't harm to try... May 8, 2015 at 11:45
  • Ah. I was aware of that... I was intending to escape the path in some way - convert the slashes to dashes or similar. Just as long as the ID was unique May 8, 2015 at 11:46
  • 1
    I customized the TBB's source code. It works by adding structure group ID to variant ID. Only variant ID is modified, file name is not modified. May 11, 2015 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.