Jump to content

AdminHelperLinks - shortcut links to edit fields and template directly from page edit


Richard Jedlička
 Share

Recommended Posts

  • 1 month later...

@Richard Jedlička I've been using this module for years and it is really a helper.

After upgrading to PW Version 3.0.213 dev (!) I encounter an error when I want to edit the page template via the quick link. The other quick links for the fields are working fine.

image.png.bffec3ce0e5612f7d490a44d7325056e.png

Heres the message:

#0 /Users/XXX/XXX/wire/core/Wire.php(413): ProcessWire\ProcessTemplate->___executeEdit()
#1 /Users/XXX/XXX/wire/core/WireHooks.php(952): ProcessWire\Wire->_callMethod('___executeEdit', Array)
#2 /Users/XXX/XXX/wire/core/Wire.php(484): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessTemplate), 'executeEdit', Array)
#3 /Users/XXX/XXX/wire/core/ProcessController.php(350): ProcessWire\Wire->__call('executeEdit', Array)
#4 /Users/XXX/XXX/wire/core/Wire.php(413): ProcessWire\ProcessController->___execute()
#5 /Users/XXX/XXX/wire/core/WireHooks.php(952): ProcessWire\Wire->_callMethod('___execute', Array)
#6 /Users/XXX/XXX/wire/core/Wire.php(484): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessController), 'execute', Array)
#7 /Users/XXX/XXX/wire/core/admin.php(160): ProcessWire\Wire->__call('execute', Array)
#8 /Users/XXX/XXX/wire/modules/AdminTheme/AdminThemeUikit/controller.php(15): require('/Users/sthumann...')
#9 /Users/XXX/XXX/site/templates/admin.php(15): require('/Users/sthumann...')
#10 /Users/XXX/XXX/wire/core/TemplateFile.php(328): require('/Users/sthumann...')
#11 /Users/XXX/XXX/wire/core/Wire.php(413): ProcessWire\TemplateFile->___render()
#12 /Users/XXX/XXX/wire/core/WireHooks.php(952): ProcessWire\Wire->_callMethod('___render', Array)
#13 /Users/XXX/XXX/wire/core/Wire.php(484): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array)
#14 /Users/XXX/XXX/wire/modules/PageRender.module(575): ProcessWire\Wire->__call('render', Array)
#15 /Users/XXX/XXX/wire/core/Wire.php(416): ProcessWire\PageRender->___renderPage(Object(ProcessWire\HookEvent))
#16 /Users/XXX/XXX/wire/core/WireHooks.php(952): ProcessWire\Wire->_callMethod('___renderPage', Array)
#17 /Users/XXX/XXX/wire/core/Wire.php(484): ProcessWire\WireHooks->runHooks(Object(ProcessWire\PageRender), 'renderPage', Array)
#18 /Users/XXX/XXX/wire/core/WireHooks.php(1060): ProcessWire\Wire->__call('renderPage', Array)
#19 /Users/XXX/XXX/wire/core/Wire.php(484): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Page), 'render', Array)
#20 /Users/XXX/XXX/wire/modules/Process/ProcessPageView.module(184): ProcessWire\Wire->__call('render', Array)
#21 /Users/XXX/XXX/wire/modules/Process/ProcessPageView.module(114): ProcessWire\ProcessPageView->renderPage(Object(ProcessWire\Page), Object(ProcessWire\PagesRequest))
#22 /Users/XXX/XXX/wire/core/Wire.php(416): ProcessWire\ProcessPageView->___execute(true)
#23 /Users/XXX/XXX/wire/core/WireHooks.php(952): ProcessWire\Wire->_callMethod('___execute', Array)
#24 /Users/XXX/XXX/wire/core/Wire.php(484): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessPageView), 'execute', Array)
#25 /Users/XXX/XXX/index.php(55): ProcessWire\Wire->__call('execute', Array)
#26 {main}

 

Link to comment
Share on other sites

15 hours ago, Richard Jedlička said:

Hi @Stefanowitsch, is this the whole error message? Looks like the stack trace only.

This entry is added to the exceptions log. Maybe it's not a problem of your module at all as it seems but has to to with the latest dev version? I have no idea why this is happening, though.

No Template specified (in /wire/modules/Process/ProcessTemplate/ProcessTemplate.module line 760)

 

Link to comment
Share on other sites

On 2/27/2023 at 11:07 AM, Richard Jedlička said:

Maybe some PW API changed so it broke it. I'll try to check it soon.

The issue is here: https://github.com/uiii/AdminHelperLinks/blob/023a5bc75028713ebcfea1212132cbe00867a024/AdminHelperLinks.js#L134

There is no need for the extra forward slash before '/setup....: ProcessWire.config.urls.admin + '/setup/template/edit?id='

For some reason it no longer works in newer PW versions but it is not needed anyway.

Edited by szabesz
typo
  • Like 1
Link to comment
Share on other sites

21 hours ago, szabesz said:

The issue is here: https://github.com/uiii/AdminHelperLinks/blob/023a5bc75028713ebcfea1212132cbe00867a024/AdminHelperLinks.js#L134

There is no need for the extra forward slash before '/setup....: ProcessWire.config.urls.admin + '/setup/template/edit?id='

For some reason it no longer works in newer PW versions but it is not needed anyway.

Double slashes used to “just work” but they redirect to the clean url since 3.0.212. Haven’t looked into the code, I suppose the query string gets lost along the way?

 

  • Like 3
Link to comment
Share on other sites

4 hours ago, Jan Romero said:

they redirect to the clean url since 3.0.212.

In this case, apparently they do not redirected to anywhere but we get a "No Template specified" exception.

4 hours ago, Jan Romero said:

I suppose the query string gets lost along the way?

Yes, they do get lost, so there is no template to edit, hence the exception.

Link to comment
Share on other sites

  • 2 weeks later...
16 hours ago, Richard Jedlička said:

Hi guys, feel free to make PR. Unfortunately, I'm not able to find a time for this now.

Hey @Richard Jedlička am I missing anything or are you asking for a PR to remove one slash in one file as @szabesz already explained?

On 3/4/2023 at 1:03 PM, szabesz said:

The issue is here: https://github.com/uiii/AdminHelperLinks/blob/023a5bc75028713ebcfea1212132cbe00867a024/AdminHelperLinks.js#L134

There is no need for the extra forward slash before '/setup....: ProcessWire.config.urls.admin + '/setup/template/edit?id='

For some reason it no longer works in newer PW versions but it is not needed anyway.

I think it would be less effort if you just changed that file yourself (you could do that even in the browser) than having someone make a pr and approve and merge that 😉

  • Like 1
Link to comment
Share on other sites

Hi @bernhard, you are right the change is simple, I can do it. I was thinking about it. But I think it is not only about the change but also about testing the module if it really works. I don't have set up the dev environment for it yet. So this was the reason for PR. I don't like throwing the change in to the wild and realizing later it doesn't work because I forgot something like increasing the module's version etc. 🤔

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 3 weeks later...
52 minutes ago, Richard Jedlička said:

@Stefanowitsch @szabesz @bernhard @cpx3 All right, the issue should be fixed, haven't tested it, please check it.

EDIT: fixed version 1.1.7

Hi @Richard Jedlička thx for the update!

Sorry for not replying to your request. I wanted to suggest taking the module under my control, but then I thought it might make more sense to create some RockMigrations tweaks instead. But I think your module is really useful and complete as it is (now with the fix 😉 ) and I guess it will work like this for a long time without any necessary maintenance, so I think there is no real pressure in changing anything.

Or do you see that differently?

  • Like 1
Link to comment
Share on other sites

  • 5 months later...
On 3/11/2022 at 2:11 PM, Richard Jedlička said:

Hi @bernhard, yes, I have it already in my backlog ? Hope I will find a time for it soon.

@Richard Jedlička & @bernhard, just want to let you know, I did a pull request for fixing issues on non label fields and on fields "not closable".

https://github.com/uiii/AdminHelperLinks/pull/6#issue-1988009038

 

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...