Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with cron URL generation in system settings #89

Closed
Kovah opened this issue Jan 24, 2020 · 4 comments
Closed

Issue with cron URL generation in system settings #89

Kovah opened this issue Jan 24, 2020 · 4 comments

Comments

@Kovah
Copy link
Owner

Kovah commented Jan 24, 2020

I updated to 0.0.28, and add SETUP_COMPLETED=true to .env file.
And tried to go to /settings/system, then LinkAce threw an exception. Plz see below:

Capture 001

What do I fail to modify?

Originally posted by @mzch in #88 (comment)

@Kovah
Copy link
Owner Author

Kovah commented Jan 24, 2020

@mzch It seems the cron token is somehow missing but the url should be generated. Please check resources/views/actions/settings/partials/system/cron.blade.php on line 31:
Replace

'route' => route('cron', ['token' => systemsettings('cron_token')])

with

'route' => route('cron', ['token' => systemsettings('cron_token') ?: ''])

and check if it's working.

@Kovah Kovah added this to To do in Issues & Support via automation Jan 24, 2020
@Kovah Kovah moved this from To do to Feedback in Issues & Support Jan 24, 2020
@Kovah Kovah changed the title I updated to 0.0.28, and add SETUP_COMPLETED=true to .env file. Issue with cron URL generation in system settings Jan 24, 2020
@mzch
Copy link

mzch commented Jan 24, 2020

I tired, but the same error occurred on line 7...

@Kovah
Copy link
Owner Author

Kovah commented Jan 25, 2020

Can you please replace in line 7

route('cron', ['token' => ''])

with

url('cron/')

This worked for me.

@mzch
Copy link

mzch commented Jan 25, 2020

@Kovah Great! Linkace goes well!
Thanks!

<div class="card">
    <div class="card-header">
        @lang('settings.cron_token')
    </div>
    <div class="cron-token card-body"
        data-confirm-message="@lang('settings.cron_token_generate_confirm')"
        data-cron-url-base="{{ url('cron/') }}/">

        <p>@lang('settings.cron_token_help')</p>

        <div class="input-group mb-3">
            <input type="text" class="cron-token-input form-control" value="{{ systemsettings('cron_token') }}"
                readonly aria-readonly="true" aria-label="@lang('settings.cron_token_generate')"
                aria-describedby="cron-token-generate">
            <div class="input-group-append">
                <button class="cron-token-generate btn btn-outline-danger" type="button">
                    <i class="fas fa-recycle mr-1"></i> @lang('settings.cron_token_generate')
                </button>
            </div>
        </div>

        <p class="cron-token-generate-failure small text-danger" style="display:none">
            @lang('settings.cron_token_generate_failure')
        </p>

        <p class="small text-warning">@lang('settings.cron_token_generate_info')</p>

        @if(systemsettings('cron_token'))
            <p>
                @lang('settings.cron_token_url', [
                    'route' => route('cron', ['token' => systemsettings('cron_token') ?: ''])
                ])
            </p>
        @endif

    </div>
</div>

@Kovah Kovah moved this from Feedback to Done in Issues & Support Jan 25, 2020
@Kovah Kovah closed this as completed Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants