Giter Site home page Giter Site logo

Comments (9)

distler avatar distler commented on July 3, 2024

Have you looked at WikiReferences::pages_redirected_to? Does it not do what you want?

I think your complaint is that WikiReferences::pages_that_include is not computed recursively (or, possibly, that it does not handle inclusions of redirected pages). But that's not quite right.

  • Let page A include page B and let page B include page C.
  • Edit page C.
  • When you save C, page A is expired.

I'm not sure what you mean by "links to deleted redirects don't get expired".

  • Say I have a page A that redirects for (the nonexistent) page B and pages C and D that link to B. Clicking on one of those links will land me on page A.
  • Now say I edit the page A and remove the redirect. Pages C and D gets expired, and the links on the are turned into "wanted page" links.
  • Now say I click on the link on page C. This creates the new page B. When I save B, page D is expired.

Is this not the behaviour you expect?

from instiki.

distler avatar distler commented on July 3, 2024

Just to be clear, inclusion of redirected pages is not allowed.

  • Page A redirects for B.
  • On page C, [[!include A]] is allowed, but [[!include B]] is not.

from instiki.

sattlerc avatar sattlerc commented on July 3, 2024

I wanted to try, but I couldn't figure out how to install Instiki again. I tried on two systems with ruby-3.0 (Arch Linux and Debian) and also the Dockerfile. Following the README, the command

ruby bundle install --path vendor/bundle

finishes successfully. But when running instiki I get the same error in every configuration:

~/instiki/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `require': cannot load such file -- rack/handler (LoadError)
        from ~/instiki/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `block in require'
        from ~/instiki/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in `new_constants_in'
        from ~/instiki/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `require'
        from ~/instiki/script/server:58:in `rescue in <top (required)>'
        from ~/instiki/script/server:55:in `<top (required)>'
        from ./instiki:6:in `load'
        from ./instiki:6:in `<main>'
~/instiki/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `require': cannot load such file -- rack/handler (LoadError)
        from ~/instiki/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `block in require'
        from ~/instiki/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in `new_constants_in'
        from ~/instiki/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `require'
        from ~/instiki/script/server:56:in `<top (required)>'
        from ./instiki:6:in `load'
        from ./instiki:6:in `<main>'

What am I doing wrong?

EDIT: When I tried the Dockerfile, I had to lift the Ruby verison to 2.6. Otherwise, the container build failed.

from instiki.

sattlerc avatar sattlerc commented on July 3, 2024

A separate cache expiration problem I just noticed when testing:

  • Every page says which pages it is included in. This is not expired when that information changes.

from instiki.

sattlerc avatar sattlerc commented on July 3, 2024

Just to be clear, inclusion of redirected pages is not allowed.

* Page A redirects for B.

* On page C, `[[!include A]]` is allowed, but `[[!include B]]` is not.

I see. I didn't know that.

from instiki.

sattlerc avatar sattlerc commented on July 3, 2024

I'm not sure what you mean by "links to deleted redirects don't get expired".

Example:

  • Create X with link to Y. Link is wanted.
  • Create Y1 with redirect for Y. Link on X is not wanted.
  • Delete the redirect on Y1. Link on X is not wanted (but should be wanted).

It seems even links to renamed pages don't get expired. Example:

  • Create X with link to Y. Link is wanted.
  • Create Y. Link on X is not wanted.
  • Rename X to X1 without setting a redirect. Link on X is not wanted (but should be wanted).

from instiki.

sattlerc avatar sattlerc commented on July 3, 2024
  • Say I have a page A that redirects for (the nonexistent) page B and pages C and D that link to B. Clicking on one of those links will land me on page A.
  • Now say I edit the page A and remove the redirect. Pages C and D gets expired, and the links on the are turned into "wanted page" links.

I can't reproduce this.

from instiki.

sattlerc avatar sattlerc commented on July 3, 2024

Here is another bug:

  • Create A with inclusion of B. Shows "could not include B".
  • Create C.
  • Rename C to B. A still shows "could not include B".

from instiki.

sattlerc avatar sattlerc commented on July 3, 2024

I think your complaint is that WikiReferences::pages_that_include is not computed recursively (or, possibly, that it does not handle inclusions of redirected pages). But that's not quite right.

* Let page A include page B and let page B include page C.

* Edit page C.

* When you save C, page A is expired.

Counterexample (not involving redirects):

  • Create A with inclusion of B. Shows "could not include B".
  • Create B with inclusion of C. Shows "could not include C". Footer says "Linked from: A" (should say: included from A).
  • Refresh A. Shows "could not include C".
  • Create C. Refresh A. Still says "could not include C" (should include C).

EDIT: Page C is not necessary in this example. So just:

  • Create A with inclusion of B. Shows "could not include B".
  • Create B. Footer says "Linked from: A" (should say: included from A).
  • Refresh A. Shows content of B.
  • Edit B. Refresh A. Still shows old content of B.

from instiki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.