Giter Site home page Giter Site logo

Comments (19)

Martimiz avatar Martimiz commented on August 14, 2024

Thanks, that's obviously a bug. I'm working on a solution.

from silverstripe-languageprefix.

Martimiz avatar Martimiz commented on August 14, 2024

I've uploaded a testbranch 'previewtest', that fixes this issue and more. These are rather big changes, so it needs some extra testing. The hardest part is to work around basic SilverStripe and Translatable behaviour, mostly in static functions, that cannot deal with language prefixes. :(

Please check out the 'previewtest' branch and let me know of any issues you might find! Thanks.

Martine

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

Thanks for the quick fix. Will be trying it out tomorrow.

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

Hi Martine,

I've updated to the previewtest branch, but the issue still exists. I've flushed and run /dev/build also. I must have missed something.

from silverstripe-languageprefix.

Martimiz avatar Martimiz commented on August 14, 2024

OK: this is what I did to test a clean install (just now):

  • downloaded silverstripe 3.1 installer
  • did composer update (see composer.json below)
  • downloaded, unpacked (and renamed) silverstripe-languageprefix-previewtest.zip
  • performed the installation
  • went to domain/admin
  • opened split view <---- Works!

I'm not sure why your version would fail... Can you please confirm you're actually using the new branch (removing the old one)?

composer.json:

{
    "name": "silverstripe/installer",
    "description": "The SilverStripe Framework Installer",
    "require": {
        "silverstripe/cms": "3.1.*@dev",
        "silverstripe/framework": "3.1.*@dev",
        "silverstripe-themes/simple": "*",
        "silverstripe/translatable": "dev-master"
    },
    "require-dev": {
        "silverstripe/docsviewer": "*",
        "silverstripe/behat-extension": "*",
        "silverstripe/buildtools": "*",
        "phpunit/phpunit": "3.7.*"
    },
    "config": {
        "process-timeout": 600  
    },
    "minimum-stability": "dev"
}

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

ok, I'll give it another go. Yes, using the new branch. Will report back.

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

Ok, still not working for me - going to start fresh as there must be something I've done somewhere that is causing an issue.

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

Right, definitely something I have done. Done a fresh setup as advised, and I can confirm the language prefix works in the CMS split view. Now I just need to figure out what I have done in my project.

Thanks for your help, very much appreciated.

Jason.

from silverstripe-languageprefix.

Martimiz avatar Martimiz commented on August 14, 2024

Please let me know of any other issues you might come across, I want to be really sure everything's fine now before I merge this into master.

Thanks, Martine

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

Right, a bit more testing, and it seems if I add entries into locale_prefix_map (_config/languageprefix.yml), that seems to present the issue, e.g.

prefixconfig:
  locale_prefix_map:
    'en_GB' : 'en'
    'en_US' : 'us'
    'fr_FR' : 'fr'
    'de_DE' : 'de'

But removing those (in the fresh install), re-instates the desired behaviour.

I'm just working through the fresh install (that works), applying configuration from my current project, to try and work out what I've done to persist the issue in my project.

from silverstripe-languageprefix.

Martimiz avatar Martimiz commented on August 14, 2024

Would you try the updated previewtest version and see if this now works for you?

Martine

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

Will do as soon as possible. Thanks for the quick responses, I'm sure you are busy on other things.

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

sorry, pressed the wrong button. Update to follow

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

Hi Martine,

The latest update sorts the issue of using the locale_prefix_map. Thanks for your help! Now I just need to pinpoint the setup in my project that causes the problem.

Jason

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

Found the problem in my project (facepalm). The version of 3.1 that I have in my active project, in the SiteTree method RelativeLink, the following doesn't exist:

$this->extend('updateRelativeLink', $base, $action);

The perils of using Beta...

Now going to spend the morning making updating the base system much easier that I have it (not really using Composer, for example)

from silverstripe-languageprefix.

Martimiz avatar Martimiz commented on August 14, 2024

While we're at it: I'm having problems with Translatable and deleting draft pages from a translated language (not the default language) - often but not always :( Seems like most times on updateTreeNodes the 'ids=' param is empty in the URL (using FireBug). I first thought this to be an issue with LanguagePrefix, but without it the issue persists.

Can you by any chance confirm this?

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

Yes, I can confirm the same behaviour.

from silverstripe-languageprefix.

Martimiz avatar Martimiz commented on August 14, 2024

Tested this on a clean install with newest 3.1 and translatable-master: problem persists, so it's definitely not a LanguagePrefix issue.

from silverstripe-languageprefix.

806software avatar 806software commented on August 14, 2024

Yes, I had just updated my project to latest 3.1 framework and cms, also with translatable master before I tested the delete issue.

from silverstripe-languageprefix.

Related Issues (17)

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.