I have detected a strange situation within ListPages module on the template page : http://ctucontract.wikidot.com/article:_template ( also using an include user :module:include:3 - at the top )
There is inserted at the top 2 Listpages modules to show the "previous" and "next" page - sorted by a dataform field "_Order2012" and wirth range=before and =after.
1. But the range=before and range=after does not exclude the current page itself!
( both versions - the included and the manual inserted Next and previous does not work correctly.)
2. The Next ( with range=after ) is not working at all - always showing the first occurence of the sortd list by the dataform field!
See also the discussion on the community: http://community.wikidot.com/forum/t-823492/comments/show?from=activities#post-2000345
It brings ALWAYS all the pages without any selection ( before/after) - starting with the first and ending with the last in the ordered sequence..!
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
It appears to me that the problem is not with ordering by the dataform field. The problem arises with pointing to the current page's location WITHIN the ordered list in order to move before or after. In fact, even if I put as a parameter range="." it does not correctly correspond to the same page. However, if I put in
It will focus on the page itself. That is, ListPages has no problem checking or even ordering against the field. It simply will not point to the ordered location based on the dataform field.
Nathan Goldbaum Chicago Teachers Union (work profile)
“Take it easy… but take it!” ~Pete Seeger (“Talking Union”)
Yes, it is now clear for me too, after some sorting / testing - the sort works correct, but the selecting of the part before or after the dataform field page is not vworking.
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
DataForm fields don't support before/after yet, checking the possibility for fast implementation.
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
Oh, please yes, this would be important and wonderfull!
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Definitely!
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
I don't have a good news for you, it's seems that it can cause hi database load. I wont close it yet but implementation is currently doubtful.
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
It would really help if we could have a (new) comparator :
< Data Form selector:
<
« Select by a field's value in a data form
« Syntax: _data-form-field-name="data-form-field-value" OR
« _data-form-field-name<"data-form-field-value" OR
« _data-form-field-name>"data-form-field-value"
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
How this new comparator could help us?
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
We can than call ListPages sotrted ny this dataform field, and reading only ONE page ( the first of the result) above or before the existing "dataform field value ( by _template)"
This would be very helpful indeed!
( and the dtabase load should not be high if we read only total limit=1 …)
All other results ( limit > 1 ) make no sense.
only perhaps "imit = "10" could be useful - in the :module:include.3 it is used fpr the next/before 10 pages in the sorted result
Edit:
1. even if the existing dataform field value does exist multiple - than the result is correct if the value is lower/greater then the searched value
2. the responsibility to have unique dataform field values lies by the user/creator of the Listpages - but LT/GT comparator is clear!
3. Dangerous would be a comparator "<=" and ">=" ! - this could bring unclear results and READ of the same/current page with the same "dataform field value"
Edit2:
Also dangerous and "forbidden" has to be a ListPages sorted by Dataform Value, and reading all pages with the SAME dataform field value … gives a loop .
But this is allowed today with the comparator "=" !!
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Problem is with joining a huge tables (page + page_source) forms are stored in YAML inside page_source->content and they are never used in WHERE clause (as this queries performs to long).
Even now ListPages with 100k+ pages sorted by DataForm field performs very slowly what is already problematic. To fix this issue we need to change way we storing DataForm data from flat YAML string stored in one field to something else.
Postgres hstore field might be good idea - but it's a lot of work.
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
I understand now that thetechnical solution(/flat YAML) for use of the dataform fields is the problem…
That means for me - the only solution at the moment for
a) sorting a category "article" by a (not shown) dataform field ( which is working well)
b) giving me the "previous" page-title ( by descending ordering "dataform field ) " needs a manually entered dataform field "order-previous"
c) the same with "next" ..
That means a lot of update .. but than the control lies on the user(admin) which previous or next ordering form has to be used to find (by ListPages) the previous page to show the title at the header.
Than we have stored the linking/joining information in (extra 2) dataform field values.
And this is than faster as a comparator with limit="1!?
Hey!
We had little modules - "PreviousPage" and "NextPage" - which gives us only ONE resulting page .. - before the outcome was replaced by ListPages wirh range="before" and ="after".
Only the sorting is again a little disturbing.
But with the tag selector we could have the same result - we need only on every page a (hidden) tag "_p_next-page-id" ( for which page is the current page the previous) and a "_n_previous-page-id" ( for which page is the current page the next page).
This would work also.. but what a manual work!!
.
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Okay. I will look for a workaround. I think I will need to find a way to change the page name (URL) into the Order2012 for all these pages. Is there a way with any of the API interfaces to do this quickly? Could the support team possibly help me with this? (I am now a Pro member).
Nathan Goldbaum Chicago Teachers Union (work profile)
“Take it easy… but take it!” ~Pete Seeger (“Talking Union”)
See also the http://feedback.wikidot.com/wish:922 (Extend type casting in ListPages to all order parameters) and the otheer bug:
http://feedback.wikidot.com/bug:891 (Page titles beginning with numerals ordered incorrectly in ListPages) !
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Well, my major need is to rename those pages so I can use page titles. Because the Order2012 field prepends 0s there is no problem using an alphabetical sort. If I can change the URL name to use the contents of the Order2012 field that will work. I almost did this from the start, but took the advice from the dataforms documentation that autonumber is best. I wish I had gone with my instincts.
Nathan Goldbaum Chicago Teachers Union (work profile)
“Take it easy… but take it!” ~Pete Seeger (“Talking Union”)
I wrote the documentation and I can assure you it doesn't say that "autonumber is best". What it says is "It is sometimes a very good idea to autonumber the category containing the data form. This will remove the risk of duplicate page names." Quite a different thing.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
I'm sorry, Rob. In my frustration at having made the wrong choice I maligned you. I apologize.
Nathan Goldbaum Chicago Teachers Union (work profile)
“Take it easy… but take it!” ~Pete Seeger (“Talking Union”)