-
Posts
2,007 -
Joined
-
Last visited
-
Days Won
21
Posts posted by dragan
-
-
Can you show us some code?
-
There are a few settings under module/edit?name=SessionLoginThrottle
-
8 minutes ago, dadish said:
Is there any chance that you can reproduce this
I'll gladly do so and try to find a pattern that might help to isolate/identify the root cause. Alas, this week I'm short on time ?
-
28 minutes ago, dadish said:
In your graphql documentation, does your page reference fields has a title field in them?
Yes.
PageType with template service. title: PageTitle! Field with the type of FieldtypePageTitle
It's listed in the config under "legalFields" (showing as "title (system)").
However, I can't choose it from legalPageFields, i.e. the dropdown doesn't list it.
-
11 minutes ago, dadish said:
So my guess would be that your page reference field does not have a template assigned to it. Is that your case?
No, they all have a template assigned (most though without a physical file - don't think that should matter).
12 minutes ago, dadish said:which in turn means we cannot know which fields those pages will have when we generate the schema (except built in fields like id, name, url and etc)
I only ever just use the system-field title. Is that not included?
Strange thing is that if I replace title with name in the query, it works. But (again, just for some PR fields) if use title, I get errors.
-
Thanks for the quick update / fix.
I tried it again today, and while empty int fields are no longer a problem, I get some other strange issues:
I can query some page reference fields, but not others. The error shown is like:
Spoiler{
"errors": [
{
"message": "Cannot query field \"title\" on type \"Page\".",
"extensions": {
"category": "graphql"
},
"locations": [
{
"line": 10,
"column": 11
}
]
},
{
"message": "Cannot query field \"title\" on type \"Page\".",
"extensions": {
"category": "graphql"
},
"locations": [
{
"line": 15,
"column": 11
}
]
},
{
"message": "Cannot query field \"title\" on type \"Page\".",
"extensions": {
"category": "graphql"
},
"locations": [
{
"line": 20,
"column": 11
}
]
}
]
}Unlike with the integer issue, the output stops, i.e. there is no additional data output shown.
I compared a pageref field that doesn't throw GraphQL errors with another one that does:
The one that works shows this in the documentation explorer panel: (when searching with the field-name)
ProductPageArray
ProductPage
ProjectPage.product
ProjectCreateInput.product
ProjectUpdateInput.productWhile others just show:
ProjectPage.industry
ProjectCreateInput.industry
ProjectUpdateInput.industry(project = template, product + industry = page reference fields)
Does that give you a hint what's happening behind the scenes?
-
I never used Hanna Code myself, but can't you just do
$buttons = $hanna->render("[[subscribebuttons]]");
and then
$out .= $buttons;
?
Don't know if you gotta have $hanna = $modules->get('TextformatterHannaCode'); inside or before your function definition though...
- 3
-
Since @ryan most likely won't read this thread, maybe someone should open an issue (with label "enhancement") here: https://github.com/processwire/processwire-requests/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement
Most probably, this would mean a huge refactoring of lots of core-code, but hey, we would all profit from a performance boost in situations mentioned in this thread.
-
1 minute ago, dadish said:
What type of field your budget field is? I assume integer, but want to be certain.
Yes, just a regular integer field.
I was just thinking... Most fields in the pages / template I'm querying are optional.
Granted, I didn't do extensive testing so far, but I guess it throws errors each time when there is no value in a field. (hence, the selector "only show if images.count > 0" was working fine). Could that be? Earlier it just outputted empty nodes or null instead (which I would expect and is totally fine).
-
I finally found some time to install the brandnew version and do some tests.
I made sure I cleared the modules cache, and cleared file compiler cache.
But I get some strange behaviour in the test-tool (pw-admin/setup/graphql/) :
Did anything major change in regards to query syntax?
This used to work previously:Spoiler{
project(s: "industry%=verwaltung, sort=-year, limit=50") {
list {
year
budget
title
project_desc_short
product {
list {
title
}
}
images {
url
httpUrl
description
width
height
}
}
}
}
Now I get lots of errors.
Even something smaller throws errors:Spoiler{
project(s: "industry%=verwaltung, sort=-year, limit=50") {
list {
year
client_name
budget
title
}
}
}If I remove "budget" field, it works. I double-checked it's in the allowed fields in the module config.
Something similar happens when I include images, and some pages don't have images.
i.e.
With this selector it works as expected:
project(s: "industry%=verwaltung, images.count>0, sort=-year, limit=3")If I just do
project(s: "industry%=verwaltung, sort=-year, limit=3") {I get stuff like this:
Spoiler{
"errors": [
{
"debugMessage": "Expected a value of type \"Int\" but received: (empty string)",
"message": "Internal server error",
"extensions": {
"category": "internal"
},
"locations": [
{
"line": 5,
"column": 7
}
],
"path": [
"project",
"list",
1,
"budget"
],
"trace": [
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 846,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeLeafValue(GraphQLType: Int, (empty string))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 726,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValue(GraphQLType: Int, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(4), (empty string))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 677,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValueWithLocatedError(GraphQLType: Int, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(4), (empty string))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 567,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValueCatchingError(GraphQLType: Int, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(4), (empty string))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 1247,
"call": "GraphQL\\Executor\\ReferenceExecutor::resolveField(GraphQLType: ProjectPage, instance of ProcessWire\\Page(0), instance of ArrayObject(1), array(4))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 1201,
"call": "GraphQL\\Executor\\ReferenceExecutor::executeFields(GraphQLType: ProjectPage, instance of ProcessWire\\Page(0), array(3), instance of ArrayObject(6))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 1163,
"call": "GraphQL\\Executor\\ReferenceExecutor::collectAndExecuteSubfields(GraphQLType: ProjectPage, instance of ArrayObject(1), array(3), instance of ProcessWire\\Page(0))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 853,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeObjectValue(GraphQLType: ProjectPage, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(3), instance of ProcessWire\\Page(0))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 726,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValue(GraphQLType: ProjectPage, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(3), instance of ProcessWire\\Page(0))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 677,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValueWithLocatedError(GraphQLType: ProjectPage, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(3), instance of ProcessWire\\Page(0))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 952,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValueCatchingError(GraphQLType: ProjectPage, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(3), instance of ProcessWire\\Page(0))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 821,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeListValue(GraphQLType: ProjectPage, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(2), instance of ProcessWire\\PageArray(3))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 726,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValue(GraphQLType: ProjectPage, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(2), instance of ProcessWire\\PageArray(3))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 677,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValueWithLocatedError(GraphQLType: ProjectPage, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(2), instance of ProcessWire\\PageArray(3))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 567,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValueCatchingError(GraphQLType: ProjectPage, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(2), instance of ProcessWire\\PageArray(3))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 1247,
"call": "GraphQL\\Executor\\ReferenceExecutor::resolveField(GraphQLType: ProjectPageArray, instance of ProcessWire\\PageArray(3), instance of ArrayObject(1), array(2))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 1201,
"call": "GraphQL\\Executor\\ReferenceExecutor::executeFields(GraphQLType: ProjectPageArray, instance of ProcessWire\\PageArray(3), array(1), instance of ArrayObject(1))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 1163,
"call": "GraphQL\\Executor\\ReferenceExecutor::collectAndExecuteSubfields(GraphQLType: ProjectPageArray, instance of ArrayObject(1), array(1), instance of ProcessWire\\PageArray(3))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 853,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeObjectValue(GraphQLType: ProjectPageArray, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(1), instance of ProcessWire\\PageArray(3))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 726,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValue(GraphQLType: ProjectPageArray, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(1), instance of ProcessWire\\PageArray(3))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 677,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValueWithLocatedError(GraphQLType: ProjectPageArray, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(1), instance of ProcessWire\\PageArray(3))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 567,
"call": "GraphQL\\Executor\\ReferenceExecutor::completeValueCatchingError(GraphQLType: ProjectPageArray, instance of ArrayObject(1), instance of GraphQL\\Type\\Definition\\ResolveInfo, array(1), instance of ProcessWire\\PageArray(3))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 1247,
"call": "GraphQL\\Executor\\ReferenceExecutor::resolveField(GraphQLType: Query, instance of ProcessWire\\Pages, instance of ArrayObject(1), array(1))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 257,
"call": "GraphQL\\Executor\\ReferenceExecutor::executeFields(GraphQLType: Query, instance of ProcessWire\\Pages, array(0), instance of ArrayObject(1))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 208,
"call": "GraphQL\\Executor\\ReferenceExecutor::executeOperation(instance of GraphQL\\Language\\AST\\OperationDefinitionNode, instance of ProcessWire\\Pages)"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/Executor/Executor.php",
"line": 155,
"call": "GraphQL\\Executor\\ReferenceExecutor::doExecute()"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/GraphQL.php",
"line": 165,
"call": "GraphQL\\Executor\\Executor::promiseToExecute(instance of GraphQL\\Executor\\Promise\\Adapter\\SyncPromiseAdapter, instance of GraphQL\\Type\\Schema, instance of GraphQL\\Language\\AST\\DocumentNode, instance of ProcessWire\\Pages, null, null, null, null)"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/vendor/webonyx/graphql-php/src/GraphQL.php",
"line": 98,
"call": "GraphQL\\GraphQL::promiseToExecute(instance of GraphQL\\Executor\\Promise\\Adapter\\SyncPromiseAdapter, instance of GraphQL\\Type\\Schema, '{\n project(s: \"industry%=verwaltung, sort=-year, limit=3\") {\n list {\n year\n budget\n title\n project_desc_short\n product {\n list {\n title\n }\n }\n images {\n url\n httpUrl\n description\n width\n height\n }\n }\n }\n}\n', instance of ProcessWire\\Pages, null, null, null, null, null)"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/ProcessGraphQL.module",
"line": 185,
"call": "GraphQL\\GraphQL::executeQuery(instance of GraphQL\\Type\\Schema, '{\n project(s: \"industry%=verwaltung, sort=-year, limit=3\") {\n list {\n year\n budget\n title\n project_desc_short\n product {\n list {\n title\n }\n }\n images {\n url\n httpUrl\n description\n width\n height\n }\n }\n }\n}\n', instance of ProcessWire\\Pages, null, null)"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 380,
"call": "ProcessWire\\ProcessGraphQL::___executeGraphQL()"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/WireHooks.php",
"line": 813,
"call": "ProcessWire\\Wire::_callMethod('___executeGraphQL', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 442,
"call": "ProcessWire\\WireHooks::runHooks(instance of ProcessWire\\ProcessGraphQL, 'executeGraphQL', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/ProcessGraphQL/ProcessGraphQL.module",
"line": 81,
"call": "ProcessWire\\Wire::__call('executeGraphQL', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 380,
"call": "ProcessWire\\ProcessGraphQL::___execute()"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/WireHooks.php",
"line": 813,
"call": "ProcessWire\\Wire::_callMethod('___execute', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 442,
"call": "ProcessWire\\WireHooks::runHooks(instance of ProcessWire\\ProcessGraphQL, 'execute', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/ProcessController.php",
"line": 337,
"call": "ProcessWire\\Wire::__call('execute', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 380,
"call": "ProcessWire\\ProcessController::___execute()"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/WireHooks.php",
"line": 813,
"call": "ProcessWire\\Wire::_callMethod('___execute', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 442,
"call": "ProcessWire\\WireHooks::runHooks(instance of ProcessWire\\ProcessController, 'execute', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/admin.php",
"line": 150,
"call": "ProcessWire\\Wire::__call('execute', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/site/modules/AdminThemeUikit/controller.php",
"line": 15,
"function": "require('/home/mysitecom/www/subdir/wire/core/admin.php')"
},
{
"file": "/home/mysitecom/www/subdir/site/assets/cache/FileCompiler/site/templates/admin.php",
"line": 15,
"function": "require('/home/mysitecom/www/subdir/site/modules/AdminThemeUikit/controller.php')"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/TemplateFile.php",
"line": 287,
"function": "require('/home/mysitecom/www/subdir/site/assets/cache/FileCompiler/site/templates/admin.php')"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 380,
"call": "ProcessWire\\TemplateFile::___render()"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/WireHooks.php",
"line": 813,
"call": "ProcessWire\\Wire::_callMethod('___render', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 442,
"call": "ProcessWire\\WireHooks::runHooks(instance of ProcessWire\\TemplateFile, 'render', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/modules/PageRender.module",
"line": 514,
"call": "ProcessWire\\Wire::__call('render', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 383,
"call": "ProcessWire\\PageRender::___renderPage(instance of ProcessWire\\HookEvent)"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/WireHooks.php",
"line": 813,
"call": "ProcessWire\\Wire::_callMethod('___renderPage', array(1))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 442,
"call": "ProcessWire\\WireHooks::runHooks(instance of ProcessWire\\PageRender, 'renderPage', array(1))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/WireHooks.php",
"line": 914,
"call": "ProcessWire\\Wire::__call('renderPage', array(1))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 442,
"call": "ProcessWire\\WireHooks::runHooks(instance of ProcessWire\\Page(0), 'render', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/modules/Process/ProcessPageView.module",
"line": 208,
"call": "ProcessWire\\Wire::__call('render', array(0))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 383,
"call": "ProcessWire\\ProcessPageView::___execute(true)"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/WireHooks.php",
"line": 813,
"call": "ProcessWire\\Wire::_callMethod('___execute', array(1))"
},
{
"file": "/home/mysitecom/www/subdir/wire/core/Wire.php",
"line": 442,
"call": "ProcessWire\\WireHooks::runHooks(instance of ProcessWire\\ProcessPageView, 'execute', array(1))"
},
{
"file": "/home/mysitecom/www/subdir/index.php",
"line": 55,
"call": "ProcessWire\\Wire::__call('execute', array(1))"
}
]
}
],
"data": {
"project": {
"list": [
{
"year": 2018,
"budget": 12345,
"title": "User Interface für xxx",
"project_desc_short": "Das Lorem Ipsum dolor site amet....",
"product": {
"list": []
},
"images": []
},
{
"year": 2018,
"budget": null,
"title": "Neue Website für ...",
"project_desc_short": "Das Lorem Ipsum dolor site amet....",
"product": {
"list": []
},
"images": []
},
{
"year": 2017,
"budget": 31156,
"title": "something else...",
"project_desc_short": "Das Lorem Ipsum dolor site amet....",
"product": {
"list": []
},
"images": []
}
]
}
}
}Funny thing is, the output at the bottom after
"data": {
"project": {
"list": [)still looks OK to me. Do I see these error messages only because the site is in debug-mode? Or because I do this in the backend as superuser?
-
4 hours ago, AndZyk said:
if anybody has experience in who good the page reference field can scale?
My only concern would be that a lot of page references can slow down page-loading in edit-mode in the admin. But just for updating / creating / reading such values, I don't think performance would suffer. You can always completely hide these PR fields in the admin (or choose to only load via AJAX when opened).
- 1
-
https://superuser.com/questions/7327/how-to-add-a-custom-search-engine-to-firefox
https://addons.mozilla.org/de/firefox/addon/custom-search-engine/
Or just bookmark my Google Custom Search Engine (or create your own): https://cse.google.com/cse?cx=013706179141317928628:dendm4c3gpq
The nice thing about GCSE is that you can freely configure several domains/sites where it should search:
As you can see... it's been used quite frequently :-)
- 1
-
To increase the chance that Ryan even sees your suggestion, I'd create a post in the Lister Pro forum (feature request). Who knows, maybe with a hook it can be already done somehow today...
-
Yeah, well in that case it really seems impossible. Can't you narrow it down with some other condition? has_parent, template, or similar? I know you said you want something future-proof, but certainly you are not adding new templates every day?
Field dependencies let you write your own logic in plain PHP (one of many options), I guess Ryan has a reason he didn't allow such freedom when it comes to Lister (Pro or not) - probably security concerns.
You might want to take a look at @bernhard's RockGrid module instead. A bit more work initially than just creating a new Lister Pro instance, but you're totally free to list / select / query whatever you like.
- 1
- 1
-
grumble... sorry, but my first example doesn't indeed work.
It seems that this (quite surprisingly) does seem to work:
page.fieldname=
At least in my test-environment, it lists all pages (my field only exists in only one template)
-
Try it with include=all as another filter.
- 1
-
Well, there's no selector "if template / page has field_x", so a workaround could be two custom selectors:
custom (field=value) 1 = meta%=
custom (field=value) 2 = meta!=Make sure to check the checkbox on the right (make it OR rather than AND)
- 1
-
well, whatever field-name it is - "body" or whatever you've named it.
-
Do you mean you place that class in CKEditor? You have to enable inline classes, otherwise the richtext editor strips it away when saving.
Admin => Setup => Fields => Your field => Input => Extra allowed content
Enter something like
a[*]{*}(*)config / syntax examples: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html#custom-mode
- 2
-
Maybe you need to add a getForPage() in there?
https://processwire.com/talk/topic/18880-getting-one-repeater-items-as-content-for-other-repeater-item-on-the-same-page/Try to use Tracy Debugger and see what dumps you get.
https://adrianbj.github.io/TracyDebugger/#/debug-methods?id=bardump -
@dadish Great news indeed! Big thanks for this rewrite. Can't wait to try it out (probably not before the weekend).
- 1
-
2 hours ago, LostKobrakai said:
This applies to (user-)data shown, but not to more or less static resources like scripts or static images of the admin / other modules.
Sure. For static resources, Cache API + service worker would probably bring speed performance. Ideally (to avoid DOM / GUI re-rendering on each page load) combined with an SPA setup. Or in PWA-speak, using an app shell.
-
On 11/17/2019 at 2:34 AM, Mikie said:
Adrian is wondering if pw core should be doing any of this. Any thoughts on what could specifically be optimised in the admin?
I was getting the impression the discussion was more "in general", not PW-admin-specific. (concerning our so-called "frontend" product we ship to clients)
There's always a lot you can optimize one way or another.
With the specific tools / methods I briefly mentioned, you could certainly optimize a few milliseconds per page load in the admin. But the major bottlenecks would still be there. So, in brief - no, not worth to optimize in this regard (imho). Of all CMS backends I have come across, PW is already faster than most.
The crucial thing of any "backend" kind of web-app is: You don't want anything to cache your current view when it shouldn't. If you just edited a page and went back to that same page, you expect to view the latest / current view.
I can imagine that a (drastic, i.e. from-the-ground-up) refactoring of the entire PW admin, with a framework like Angular (Vue, React...) would significantly speed things up. But that's a completely new topic, far from trivial, and would really mean a LOT of refactoring...
As someone once mentioned, PW admin loads all template and field infos, plus role-/access-based stuff on load. And this takes a lot of time. Of course you could cache that in order to save a few milliseconds, but then again - an admin web view needs the latest state, always. Without completely switching to a modern SPA framework and radical code-rewrite, I don't see much (noticeable) benefits from just using resource hints.
The DOM itself is one of the biggest show-stoppers here...
- 1
-
@franciccio-ITALIANO Start the server and then open http://localhost/processwire-master/ in your browser. (or, if you have enabled it in Laragon, http://processwire-master.test)
- 1
Image Field: Empty URL
in General Support
Posted
What's your relevant code in your template file?
That's not an image/file URL, i.e. not $imagefieldname->url
What's inside this array? I guess the images? Or is it empty?
Looking at your screenshot, why is there a visible <img src=... in the middle of nowhere? Did you inspect that?