Code Monkey home page Code Monkey logo

silverstripe-homepagefordomain's Introduction

Homepage for domain module

Allows to designate a page anywhere in the tree as the homepage for a specific domain, overruling the usual homepage (which is identified by the "home" URLSegment).

This module replaces silverstripe/homepagefordomain, which has been abandoned.

Requirements

  • SilverStripe 4

Installation

Using composer

composer require twohill/silverstripe-homepagefordomain

License

BSD 3-Clause "New" or "Revised" License. See License

Maintainers

Bugtracker

Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.

If the issue does look like a new bug:

  • Create a new issue
  • Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
  • Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.

Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.

Development and contribution

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.

silverstripe-homepagefordomain's People

Contributors

altwohill avatar bummzack avatar chillu avatar dhensby avatar normann avatar phalkunz avatar purplespider avatar stevevu avatar wilr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

silverstripe-homepagefordomain's Issues

On dev/build/?flush=1 i get the following error SS3.02

Strict Standards: Declaration of HomepageForDomainExtension::extraStatics() should be compatible with that of DataExtension::extraStatics() in E:\xampp\htdocs\gr-locks\homepagefordomain\code\HomepageForDomainExtension.php on line 66

Strict Standards: Declaration of HomepageForDomainExtension::updateFieldLabels() should be compatible with that of DataExtension::updateFieldLabels() in E:\xampp\htdocs\gr-locks\homepagefordomain\code\HomepageForDomainExtension.php on line 66

HomepageForDomain doesn't work with www

Moved from http://open.silverstripe.org/ticket/4489

On a fresh install of SS 2.3.3, entering a value for "Use this page as the 'home page' for the following domains:" in behaviour tab only makes this page as homepage, when the domain is entered without www.

So entering "domain.com" works, but not "www.domain.com".

If this behaviour is wanted, please add a note in the UI.

php: PHP 5.2.0-8+etch15 mysql: 5.0.32-Debian_7etch10-log

The 1st run of dev/build after installation always fails

Replicated version: v1.0.0
Replicated environment: dev

After installation of the module, I try to run a dev/build task from CLI, it throws an error:

Undefined index 'HTTP_HOST' at line 19 in class Twohill\HomepageForDomain\RootURLControllerExtension

Then I try to run the dev/build from a browser, it throws another error:

Unknown column SiteTree.HomepageForDomain in WHERE clause at line 21 in class
Twohill\HomepageForDomain\RootURLControllerExtension

Produce Steps:

  • Step 1: Install the module (success)
  • Step 2: run 'sake dev/build' in command line (fail)
  • Step 3: run /dev/build from a browser (fail)

Analysis:
Failure at Step 2 is obvious, we need to ensure that we could get a $host from $_SERVER['HTTP_HOST'] for update a homepage link we need to check if such a $_SERVER['HTTP_HOST'] exists.
Failure at Step 3 is due to the function is executed before the column HomepageForDomain is created in table SiteTree

_t() Deprecation warning

Using the latest SS3.0 branch, I get the following error after installing homepagefordomain.

The $priority argument to _t() is deprecated, please use module inclusion priorities instead. Called from . 
Deprecation.php:173
Deprecation::notice(3.0,The $priority argument to _t() is deprecated, please use module inclusion priorities instead,4) 
i18n.php:1480
i18n::_t(SiteTree.HOMEPAGEFORDOMAIN,Domain(s),50,Listing domains that should be used as homepage) 
Core.php:360
_t(SiteTree.HOMEPAGEFORDOMAIN,Domain(s),50,Listing domains that should be used as homepage) 
HomepageForDomainExtension.php:29

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.