TypiCMS / Base

Multilingual CMS built with Laravel.
MIT License
1.39k stars 403 forks source link

Undefined property: TypiCMS\Modules\Menus\Models\Menulink::$title #81

Closed energeyes closed 8 years ago

energeyes commented 8 years ago

Hi, after composer update (typicms/core v.2.7.33) I got this issue on all models:

ErrorException in Base.php line 153: Undefined property: TypiCMS\Modules\Menus\Models\Menulink::$title (View: /path/to/resources/views/vendor/menus/public/_item.blade.php)

Line 153 in Base.php:

public function getTitleAttribute($value) { return $this->title; }

and when I change this line to:

public function getTitleAttribute($value) { return $this->title = $value; }

everything becomes ok. Same thing on getStatusAttribute method.

Is this ok? Thank you

sdebacker commented 8 years ago

Hello,

What is your version of Laravel-translatable ? If you fix it to v5.6, there shouldn't be any problem. Otherwise your solution should be ok.

Samuel

energeyes commented 8 years ago

Hi, I'll check and come back with response, thank you.

energeyes commented 8 years ago

Hello, It still not working. Here is my composer.json with fixed versions, maybe any conflicts that you know. Thank you.

{
    "name": "typicms/base",
    "description": "Multilingual CMS built with Laravel 5",
    "keywords": ["cms", "multilingual", "laravel", "typi"],
    "license": "MIT",
    "authors": [
        {
            "name": "Samuel De Backer",
            "email": "samuel@typidesign.be",
            "role": "Developer"
        }
    ],
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.39",
        "dimsav/laravel-translatable": "5.6.1",
        "barryvdh/laravel-debugbar": "2.2.2",
        "cviebrock/image-validator": "2.0.1",
        "edvinaskrucas/notification": "5.1.1",
        "guzzlehttp/guzzle": "6.2.0",
        "laracasts/presenter": "0.2.1",
        "laracasts/utilities": "2.1",
        "bkwld/croppa": "4.4.0",
        "maatwebsite/laravel-sidebar": "1.1.1",
        "propaganistas/laravel-translatable-bootforms": "1.3.1",
        "adamwathan/form": "0.8.4",
        "typicms/nestablecollection": "1.1.1",
        "typicms/core": "2.7.33",
        "typicms/dashboard": "2.7.1",
        "typicms/files": "2.7.3",
        "typicms/galleries": "2.7.2",
        "typicms/groups": "2.7.2",
        "typicms/history": "2.7.2",
        "typicms/settings": "2.7.1",
        "typicms/sitemap": "2.7.0",
        "typicms/translations": "2.7.1",
        "laravel/socialite": "2.0.18",
        "nesbot/carbon": "1.21.0",
        "lukepolo/laracart": "1.1.26",
        "meebio/omnipay-secure-trading":"1.1.0",
        "clue/socket-raw":"1.2.0",
        "inacho/php-credit-card-validator": "1.0.2",
        "rtconner/laravel-kint": "2.0.1",
        "giggsey/libphonenumber-for-php": "7.4.4",
        "maatwebsite/excel": "2.1.2"
    },
    "require-dev": {
        "laracasts/generators": "~1.1",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "symfony/css-selector": "2.8.*|3.0.*",
        "symfony/dom-crawler": "2.8.*|3.0.*"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/",
            "TypiCMS\\Modules\\": "Modules/"
        },
        "files": [
            "app/helpers.php"
        ]
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "php clear-compiled",
            "php artisan clear-html",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php clear-compiled",
            "php artisan clear-html",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "stable"
}
sdebacker commented 8 years ago

You have to fix dimsav/laravel-translatable to 5.6.0, not 5.6.1. Does it work better ?

energeyes commented 8 years ago

Ohh, it works with 5.6.0! Thank you, great library, great support!