Coder Social home page Coder Social logo

Comments (5)

letrunghieu avatar letrunghieu commented on August 20, 2024

Hi,

Thanks for using this package. Can you give me some code in your 404 page and how you using Active::pattern in that?

from active.

vince749 avatar vince749 commented on August 20, 2024

Sample template (errors.catch-all) where using Active::pattern :

  [...]
 {{-- Collect the nav links, forms, and other content for toggling --}}
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav nav-left">
              <li class="{{ Active::pattern('/') }}"><a href="/">{{ _('Home')}}</a></li>
              <li class="{{ Active::pattern('about') }}"><a href="{{ url('about') }}">{{ _('About') }}</a></li>
              <li class="{{ Active::pattern('contact') }}"><a href="{{ url('contact') }}">{{ _('Contact') }}</a></li>
              <li class="{{ Active::pattern('testimoni') }}"><a href="{{ url('testimoni') }}">{{ _('Testimony') }}</a></li>
            </ul>
  [...]
  <!-- begin:heading -->
  <div class="heads" style="background: url(/img/img02.jpg) center center;">
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <h2><span>//</span> {{ _('Error') }}</h2>
        </div>
      </div>
    </div>
  </div>
  <!-- end:heading -->

  <!-- begin:content -->
  <div class="page-content">
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <ol class="breadcrumb">
              <li><a href="#">{{ _('Error') }}</a></li>
              <li class="active">{{ _('Not found') }}</li>
            </ol>
        </div>
      </div>
      <div class="row">
        <h1>{{ _('We’re sorry but something went wrong') }}</h1>

        <p>
          {{ _('We are working to correct this, so please wait a few moments and <a href="">try again</a>.') }}
        </p>
      </div>
    </div>
  </div>
@stop
  [...]

And in app/start/global

App::error(function (Exception $exception, $code)
{
    Log::error($exception);
    if ( ! Config::get('app.debug') )
    {   
        return Response::make(View::make('errors.catch-all', ['code' => $code]), $code);
    }
});

Thank you for your return because your plugin is great.

from active.

letrunghieu avatar letrunghieu commented on August 20, 2024

There is a problems in your view file. Laravel 4 stop using _ function for translation, you should use trans function instead. You can check your laravel.log to see the error 😄

from active.

vince749 avatar vince749 commented on August 20, 2024

I use the plugin l4gettext this is why function is _, anyway...

But I redo the test by removing all foncitons translation and the problem remains the same.
The problem is probably elsewhere, I try on my side to come back with at least one track.

from active.

vince749 avatar vince749 commented on August 20, 2024

Yeah ! it's seems the very last version, resolves this bug.
composer update FTW !

from active.

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.