Upgrading to 1.7.11: Invalid Context errors.

Trying to upgrade from 1.7.5 to 1.7.11 but getting "Invalid Context" errors when downloading a single resource.

The theme produces the the following url:

/index.php/Detail/DownloadRepresentation/representation_id/12/object_id/16/download/1/version/original

which leads to:

Invalid context in /var/www/html/app/controllers/DetailController.php line 714:

  1. In DetailController->DownloadRepresentation() in RequestDispatcher line 273
  2. At RequestDispatcher->dispatch() in AppController line 113
  3. At AppController->dispatch() in index line 124


Comments

  • Your theme likely doesn't pass the context parameter, which was added later. You'll have to revise the links in your theme, assuming you are using a custom theme.

  • It is a custom theme which you actually created. The download links work when there are multiple assets, but then there is only one it generates the invalid context error.

    If I am correct, in themes/___/views/Details/ca_objects_default_html.php this is what is generating the download link for a single asset:

    $va_component_info["download"] = caNavLink($this->request, "<i class='fa fa-download'></i>", 'btn-default btn-orange btn-icon', 'Detail', 'DownloadRepresentation', '', array('representation_id' => $t_representation->getPrimaryKey(), "object_id" => $q_components->get("ca_objects.object_id"), "download" => 1, "version" => $vs_download_version), array("title" => _t("Download")));

    Is it just a matter of adding additional parameter to the array?

  • Yeah, it is. Which theme is this? I'll take a look at it and send you working code. Might save you some time.

  • Thanks. Will message you by email.

Sign In or Register to comment.