Giter Site home page Giter Site logo

lerni / folderindex Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 242 KB

Silverstripe Module to set X-Robots-Tag noindex, nofollow, noimageindex, noarchive, and nosnippet for files in folders and sub-folders when ShowInSearch is unchecked.

License: BSD 3-Clause "New" or "Revised" License

PHP 80.91% Scheme 19.09%
assets file noindex silverstripe x-robots-tag

folderindex's People

Contributors

digitall-it avatar lerni avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

digitall-it

folderindex's Issues

Fails on initial dev/build, but works subsequently

DB isn't ready when PublicAssetAdapter_HTAccess.ss asks for $list("SilverStripe\Assets\Folder").filter("ShowInSearch", 0) so we get

<[Emergency] Uncaught SilverStripe\ORM\Connect\DatabaseException: Couldn't run query: SELECT CASE WHEN EXISTS SELECT * FROM "File" WHERE ("File"."ClassName" IN (?))) THEN 1 ELSE 0 END Table 'ss_ssvanilla.file' doesn't exist

Happens on fresh projects with this module installed. The template for assets/.htaccess is generated early in the course of a first/initial request but than, still DB isn't generated and so querying it errors. It's a bit of a chicken egg situation, AssetAdapter should probable be tweaked to completely bail out generating assets/.htaccess if tables aren't generated yet?

Check composer.json autoloader

Your composer.json autoloads the folder /folderindex mapping it to the App\ namespace, however there are just classes namespaced under Kraftausdruck\Extensions in that folder. I wonder if the composer.json would be more correct by putting Kraftausdruck\ as a PSR-4 autoloading namespace or if everything is right and I didn't get how that works (very possible, indeed, and in that case, that would be an educative moment for me).

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.