Skip to content

Commit

Permalink
40521: Link Areas on images in page editor broken after export/import
Browse files Browse the repository at this point in the history
  • Loading branch information
alex40724 committed Mar 7, 2024
1 parent fe0bbf1 commit 37cd41d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions components/ILIAS/COPage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ During editing footnotes are not replaced with the numbering scheme, since this

- Not all contexts support internal links. If the "More > Link" menu does not offer the menu item "Internal Link" while editing text paragraphs, the context does not support internal links. If the internal link format is used anyway in a paragraph, e.g. by copying it from other sources, the outcome (both in editing and presentation) is currently undefined.
- If containers are copied and container page content links to sub-containers (e.g. folders), you need to use internal links and instance link areas for media objects to have them updated during the copy process.
- If containers are exported/imported, ILIAS will update the internal links to repository objects by searching for to repository objects having the target object id set as their import id. More than one object may have this ID (imported multiple times). ILIAS will choose the latest imported object and re-reference the link accordingly (ilPageObject->resolveIntLinks()).

## Anchors

Expand Down
8 changes: 5 additions & 3 deletions components/ILIAS/COPage/classes/class.ilCOPageImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ public function finalProcessing(

$ref_mapping = $a_mapping->getMappingsOfEntity('components/ILIAS/Container', 'refs');

//if (count($media_objects) > 0 || count($file_objects) > 0)
//{
foreach ($pages as $p) {
$id = explode(":", $p);
if (count($id) == 3) {
Expand All @@ -168,10 +166,14 @@ public function finalProcessing(
}
}
}
//}
$this->log->debug("end");
}

public function afterContainerImportProcessing(
ilImportMapping $a_mapping
): void {
}

/**
* Extract the properties of the plugged page contents
* The page XML is scanned for plugged contents with own importers
Expand Down

0 comments on commit 37cd41d

Please sign in to comment.