Adam Kiss
Moderators-
Posts
1,303 -
Joined
-
Days Won
7
Everything posted by Adam Kiss
-
Problem: Ajax -requests getting 301 redirects
Adam Kiss replied to foobar123's topic in General Support
What is your slash setting on the template? If you have no trailing slash turned on it would get redirected from domain/url/ to domain/url — and as you have trailing slash in the JS, it could be that you've turned it off. (also, it seems you're using input segments. Those have have the trailing slash setting as well) -
How to use a variable from one template in another
Adam Kiss replied to Reid Bramblett's topic in Getting Started
You should probably take a pen, a paper, draw a sitemap and define a use case: (example) "when user clicks on interest on the page /places/london/see/, he should be taken to /interests/interest/{$name}, where he'll see other interests from this place". Because otherwise this is a guessing game; ProcessWire allows you to structure your content any way you might want (and some you definitely do not want). Unless you have an idea what you want, every opinion will just confuse you. On the other hand, when you'll have the sitemap (and well defined usecase), we can better assist you in achieving what you want/need. -
wireshell - an extendable ProcessWire command line interface
Adam Kiss replied to marcus's topic in API & Templates
Yes, except clicking on the nav doesn't seem to give it focus. -
This is awesome. When/if you watch it, you should post your favourite casters as well.
-
wireshell - an extendable ProcessWire command line interface
Adam Kiss replied to marcus's topic in API & Templates
Install: Right, a global lumen installer from laravel requires guzzlehttp/*, but newer versions, so wireshell couldn't be installed (maybe a note in the docs?). Thanks, guys Re: scrolling It might be just Safari, which seems to work in mysterious ways. -
wireshell - an extendable ProcessWire command line interface
Adam Kiss replied to marcus's topic in API & Templates
Hey guys, couple of notes: - you haven't "released" the 0.5.0 on the GitHub, so composer tries to install 0.4.1 - on the site, the composer --globally link (in the install) has a couple of spaces between '00-intro' and '.md', so it 404s - on the site, you don't see the whole navigation, and it isn't scrollable under 900px I think (as in: 1280x800 macbook Also, I can't install 0.4.1 due to guzzlehttp/streams issue (I have global 3.0.0 installed); will wait vor the 0.5.0 version and report then if it doesn't work. Thanks -
Make directory writable by php and cache file
Adam Kiss replied to eze102's topic in Getting Started
Does the /site/assets/cache/ folder exist?- 6 replies
-
- cache
- directories
-
(and 2 more)
Tagged with:
-
So… it was GD related error and it's fixed now?
-
Repeater won't save repeater items added programmatically
Adam Kiss replied to efiguerola's topic in API & Templates
try adding $gridItem->of(false); after the first save. This should turn off output formatting and allow saving. -
How to use a variable from one template in another
Adam Kiss replied to Reid Bramblett's topic in Getting Started
Ah, I see. But why would you do it? -
How to use a variable from one template in another
Adam Kiss replied to Reid Bramblett's topic in Getting Started
But aren't those already navigatable by url if you're linking to them (like the OP does)? (also: navigatable. High five Diogo) -
mobile login problems - session fingerprint
Adam Kiss replied to bernhard's topic in General Support
I had something like this happen once. Somehow the wire cookie was empty, but existing — so it wasn't set to real cookie, but also wasn't working. Try clearing your cookies -
How to import table of data into ProcessWire
Adam Kiss replied to Tony Carnell's topic in General Support
Or by some other field/way, if title might not be unique. For instance, when adding children to previously empty page for the first time, you simply check for $parent->children->count -
How to debug $page->prev - $page->next no output given
Adam Kiss replied to mr-fan's topic in API & Templates
Alternatively, after save you could do this (for the added lulz, I guess?): $anzeige = $pages->get($anzeige->id); echo $anzeige->next()->id; //1234 -
How to use a variable from one template in another
Adam Kiss replied to Reid Bramblett's topic in Getting Started
I think it can be much simpler: Turn on url segments for interests, and link to /interests/interest1/PLACE/, where PLACE is the first url segment. //poi.php $url = "/interests/interest/{$page->parent->parent->id}/"; //interest.php if ($input->urlSegment1){ //validate that the url segment isn't bullshit $place = $pages->get((int)$input->urlSegment1); if (!$place->id || $place->template != 'place') { $session->redirect( … ); } $pois = $place->find('template=poi, interest={$page->id}'); // here you go. // alternatively, if you want to fiter out the 'sender', // add it as second url segment (and after check&validation), use: $pois = $place->find("template=poi, interest={$page->id}, id!={$poi_from_segment_id}"); } -
Zero setup page rendering with caching, with simple replacements. Useful if you have complicated templates (or a large number of less complicated ones), where you often need to do a small number of adjustments. In this case, caching on the template level doesn't completely make sense — because it either uses cache, or doesn't. This module solves this problem by using markup cache all the time, but allowing us to modify the output by replacement of simple strings. - On GitHub - On modules.processwire.com Edit: Also, small thanks to Tom Reno for testing what single language install return for $user->language
-
Ryan, is there any particular reason why this module is singular? (Or better question: could it not be?) I think that blocks nested caching (which is @Hari's problem as well, I think). Thanks.
-
I would probably organize it this way: - /categories/ - category - /categories/questions/ - question1 - question template with repeater for answers - answer is just a text and checkbox 'correct' - question2 - ... - /categories/tests/ - test1 - test template - just a page reference field to ../questions/* - test2 - ... I am not 100% sure, but I think you can add children to users, since it's basically just a page? If you can't, it shouldn't be hard create a page for each user automatically, somewhere else in the tree. - /users/userId/ - ./attempts/ - /md5(pageId)/ - 'test-attempt' template. has a page field for a test, has a text input for a serialized form data. The workflow would be: 1. load test (build it from the questions) 2. take it 3. on submit, create new page under /attempts/, add answers, calculate results 4. show results. Bam. Done.
-
Find page name field in non default language.
Adam Kiss replied to elabx's topic in Multi-Language Support
It's because default language does have an id, but the field for the default language doesn't use it. So you have: - lang: default, id: 1017, field: name - lang: other, id: 1019, field: name1019 - lang: third, id: 1020, field: name1020 So, if you just tried get("name$langId") for default language, you'd try to access "name1017", which doesn't exist. -
And one more thing: Is this multi language? (Then, the 'child' could not be active).
-
My guess: the child is hidden. $page->find() finds all descendants from the $page. If logged in as a superuser, you see any page on the site. If logged in as a guest, the pages set to hidden (and/or other settings you have on the page) ar invisible. find() finds 6 pages — child + 5 grandchildren, but child is hidden for guest, thus returning only the 5 grandchildren.
-
Libsass + sassc for the win, man.
-
Any implications of having custom classes instead of Page?
Adam Kiss replied to Adam Kiss's topic in API & Templates
My original post is also three years old -
And no error? I'd venture you're running into memory limit (or script execution time limit).
-
WireCache Unable to encode array data for cache..
Adam Kiss replied to Can's topic in General Support
No problem.