Wanze
PW-Moderators-
Posts
1,116 -
Joined
-
Last visited
-
Days Won
10
Everything posted by Wanze
-
How did you add the rule for redirecting example.php, with the leading slash? From the description: @Mike Rockett Just used this module for the first time, it's great!! Thanks for your work Cheers
-
Nice, merry christmas and enjoy holidays! Btw what's the meaning of the white circles moving top-down?
-
Hi zyON, I think the problem is that the used fonts don't contain your portuguese characters. Can you try to change your WirePDF settings: Mode: "s" instead of "c" Font: "DejaVuSans" See this post for more information: https://processwire.com/talk/topic/3008-pages2pdf/page-6#entry96263 If this does not work, you'd probably need to add a font that supports your character set by yourself to mPDF.
-
You can still visit unpublished pages when logged in as superuser, that's why your template code gets executed. If you want to handle via this via unpublished status, simply add this on top of your template file: if ($page->isUnpublished()) { throw new Wire404Exception(); } ... or if you want a message remembering yourself that you need to unpublish the page, instead of a 404, echo out something and return Cheers
-
The other links are 404. Enable debug mode and check for errors. Maybe a problem with permission settings or missing template files?
-
Hi Jürgen, As LostKObrakai says, I guess your FTP programm shows the directory of your web-root as root, so the path you entered in the config is not correct. The purpose of this module is that the files are stored outside of the web root. From your screenshot it looks like your "var" folder is beside ProcessWire's "site" folder, this would still be inside your web-root.
-
Hi Juergen, v 1.0.1 works fine here on the latest dev. What version of ProcessWire are you using? From your screenshots it looks like the "var" folder is inside the root folder of ProcessWire. You should create your folder "securefiles" inside /var/, which lies on the root of your harddisk, outside of the web-root. Not sure if this is the problem, as you pointed out that everything worked before. But the message you're seeing is an exception of my module, thrown here: https://github.com/wanze/FieldtypeSecureFile/blob/master/FieldtypeSecureFile.module#L69 This indicates that the folder does not exist or is not writable. Cheers
-
Your subdomains should point to the same document root where all the ProcessWire files are in (.htaccess, index.php, site, site-starter1 etc.), not to the site folders
-
Hi, The problem is that $pages->find() returns Page objects, it takes a lot of memory and time to build > 7000 objects. The solution is to paginate your results. Are you displaying over 7000 results on your site?
-
Extending the Page class - How to access fields?
Wanze replied to thetuningspoon's topic in Module/Plugin Development
Hi, Not sure why it shouldn't work, did you try getting a field or value with $this->get('title') ? -
@Spica Nope not yet, I will consider this for the next version. Makes sense!
-
I think you need the full path to the file, e.g. /var/www/mysite/site/templates/myCss.css If you don't know the path, check the output of "$config->paths->templates". Let me know if it still does not work!
-
@Spica, I don't understand your question, are you trying to set the path to the template that defines the markup of the PDF? $pdf = $modules->get('WirePDF'); $pdf->markupMain = $config->paths->templates . 'pdf_template.php';
-
Guess: Template caching active or some other caching (ProCache etc.) ?
-
Hi, I'm sorry, I read it three times and don't think I understand your scenario Are your users not seeing the correct pages in a Page field where they can create new pages? If so, can you explain the setup of this field and the setup of your permissions?
-
All pages other than home return 404 Error. Tried all usual measures.
Wanze replied to Pablos's topic in General Support
The 404 page is served by ProcessWire? Can you log into the backend and check the permissions? Does it also happen as SuperUser? -
Hi, $pageArray = $pages->getById("313|34|23|978"); Cheers
-
Hi sambadave, Error: Maximum execution time of 30 seconds exceeded (line 1896 of /Applications/MAMP/htdocs/viceroy/wire/core/Pages.php) Can you post the code around this line in Pages.php? I'm not sure on which version you are now. If it's database related, and the database is corrupt: Generate a DB-Dump either via console or export in phpMyAdmin, create a new table and import the dump again. Then either copy the ProcessWire installation and edit the credentials in site/config.php to match the new db name/user/password, or do the same on the live-site. Maybe it fixes your problem? Cheers
-
$user in /site/config.php in older version PW 2.2.17
Wanze replied to Raymond Geerts's topic in General Support
Hi Raymond, The problem is that the config file is parsed by ProcessWire before the API is ready, so the user object is not yet accessible. I suppose you could create an autoload module and set/overwrite config values there, based on the user. Cheers -
Dude, It's ProcessWire, why using an external guestbook? $entry = new Page(); $entry->template = 'guestbook-entry'; $entry->parent = $pages->get('/guestbook-entries/'); $entry->name = 'John Doe'; $entry->date = time(); $entry->comment = 'ProcessWire rocks'; $entry->save(); $entries = $pages->find('template=guestbook-entry,sort=-date,limit=100'); foreach ($entries as $entry) { echo '<h2>' . $entry->name . '</h2>'; echo '<p>' . $entry->comment . '</p>'; }
-
I removed the check to constructor arguments with the latest release on the dev branch. However, you always need to set the config options before saving the PDF file. This feature is available on the dev branch, you should now be able to call any method on the mPDF instance directly trough WirePDF (as long as the method does not exist as public method on WirePDF already). Technically setting back the mPDF instance was not needed before, I removed this from the ReadMe. If you find any time to get a copy from the dev branch and check if everything works for you, that would be great! Cheers
-
I can't reproduce this problem here locally, with the latest dev version. Could you tell me the Pw version and Browser? Thanks! Of course. I also fixed the bug with the help of your solution on GitHub. I'll add some more options to the module and will push everything on GitHub this evening or tomorrow.
-
Anything you put into a selector must be sanitized with $sanitizer->selectorValue(), you are using $sanitizer->url() which is not enough. An URL can for example contain the problematic "%" character, which is a reserved in a selector string.
-
Hi Adrian, Thanks for the information. Do you know if I can solve this somehow? Seems like ProcessWire should look for the missing dependency as well when using the classname installation-mode, but I'm not sure if this is easy possible. Cheers Edit: Thanks LostKobrakai for opening the issue
-
Hi guys, This is a bug. It should work if you add $this->initPDF() before this line: https://github.com/wanze/Pages2Pdf/blob/master/WirePDF.module#L91 I will fix it and update the module. Cheers