Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cops drops subdirectories in links, and what I've 'done' about it #12

Closed
NeilBryant opened this issue Sep 2, 2012 · 2 comments
Closed
Labels

Comments

@NeilBryant
Copy link

I've had to put cops in a subdirectory: localhost/opds

In the feed, the fetch links and half of the feed links lose the subdirectory. This leaves me able to browse around, but trying to download any book points it to /fetch.php?yadda, which is 404.

A chunk of the xml looks like this:

Sébastien Lucas http://blog.slucas.fr sebastien@slucas.fr <title>A Study of Practical Deduplication</title> 2012-09-02T23:08:03+02:00 urn:uuid:25208019-ef43-4a69-8f2f-16a227f0444e ##

I modified line 98 of data.php as follows:
from

    if (preg_match ('/^\//', $config['calibre_directory']))
    {
        if ($type != "jpg") $textData .= "&type=" . $type;
        return new Link ("fetch.php?id=$book->id" . $textData, $mime, $rel, $title);
    }

to (just adding the 'cops_full_url' prefix)

    if (preg_match ('/^\//', $config['calibre_directory']))
    {
        if ($type != "jpg") $textData .= "&type=" . $type;
        return new Link ($config['cops_full_url'] . "fetch.php?id=$book->id" . $textData, $mime, $rel, $title);
    }

That block of xml now looks like this:

Sébastien Lucas http://blog.slucas.fr sebastien@slucas.fr <title>A Study of Practical Deduplication</title> 2012-09-02T23:54:56+02:00 urn:uuid:25208019-ef43-4a69-8f2f-16a227f0444e ##

I'm not certain that cops_full_url is the correct thing to use, here, but it works, at least as far as letting me use the system.

it still leaves image and search links in a questionable state, but that's what I've got, right now.

@seblucas
Copy link
Owner

seblucas commented Sep 7, 2012

I failed to reproduce your problem.

Can you post your config_local.php ?

thanks in advance.

@seblucas
Copy link
Owner

It's been almost a month. I'll close it. Feel free to reopen with more information in case you have this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants