-
Posts
802 -
Joined
-
Last visited
-
Days Won
6
Everything posted by benbyf
-
Currently working on a premium module and I would love to be able to sell it through the PW store (currently not possible) and maybe have the store handle code creation.
-
any specifics? Let me know if you need any more help http://www.benbyford.com
-
getting this error after submitting a new module to the processwire.com site. The module is called PostProcessUrl. Unable to complete this request due to an error. - Error has been logged.
-
I've created a quick module implementation of @Can's work. https://github.com/benbyford/PostProcessUrl Hard Truncates any page name / url to a max length if exceeded.
-
or write some CSS and don't rely on frameworks
-
ok that was hard work. I finally managed to upgrade from 2.4 - 3.0 without SQL errors, not sure how i did it to be honest. However, when on 3.x. I ran into a few Internal Server Errors: 2017-04-20 15:48:04 ? http://shortunsserver.nicegrp.com/?/ Error: Class 'InputfieldText' not found (line 7 of /srv/users/serverpilot/apps/shortuns/public/wire/modules/Inputfield/InputfieldPassword.module) 2017-04-20 15:44:46 ? http://shortunsserver.nicegrp.com/?/ Error: Class 'ModuleJS' not found (line 3 of /srv/users/serverpilot/apps/shortuns/public/wire/modules/Jquery/JqueryFancybox/JqueryFancybox.module) and 2017-04-20 15:38:34 ? http://shortunsserver.nicegrp.com/?/ Error: Class 'ModuleJS' not found (line 3 of /srv/users/serverpilot/apps/shortuns/public/wire/modules/Jquery/JqueryFancybox/JqueryFancybox.module) I was able to fix each one of these by adding the <?php namespace ProcessWire; at the top of each file... now works but still a bit confused.
-
errors in system-updater.txt 2017-04-19 17:10:37 ERROR: Update #SystemUpdate12 ERROR: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created' 2017-04-19 17:10:37 ERROR: Update #SystemUpdate12 ERROR: Failed to apply update 12
-
yep that gist solves it. I just kept the wireSendFile() if the file isn't a partial content reponse and works well. Thanks @abdus! new games podcast with my friends www.threepointspodcast.com/
-
think maybe my Headers are still wrong as it has a problem when seeking - gives me a "video or MIME type not supported" error
-
cooooooooool, will try and amend. Your 2 cents is super useful but seems your code was a mix of your suggestions and code needing amending no? bit confusing sorry
-
please see this post if your having issues with byte-range request validation on itunes:
-
That anwser did the trick i think, i managed to make the implementation below. It must have been a new itunes requirement for byte-range headers. $filesize = filesize($page->mp3->httpUrl); $offset = 0; $length = $filesize; if ( isset($_SERVER['HTTP_RANGE']) ) { // if the HTTP_RANGE header is set we're dealing with partial content $partialContent = true; // find the requested range // this might be too simplistic, apparently the client can request // multiple ranges, which can become pretty complex, so ignore it for now preg_match('/bytes=(\d+)-(\d+)?/', $_SERVER['HTTP_RANGE'], $matches); $offset = intval($matches[1]); $length = intval($matches[2]) - $offset; } else { $partialContent = false; } $file = fopen($page->mp3->httpUrl, 'r'); // seek to the requested offset, this is 0 if it's not a partial content request fseek($page->mp3->httpUrl, $offset); $data = fread($page->mp3->httpUrl, $length); fclose($page->mp3->httpUrl); if ( $partialContent ) { // output the right headers for partial content $headers = array( 'HTTP/1.1 206 Partial Content' => true, 'Content-Type' => 'audio/mp3', 'Content-Length' => $filesize, 'Content-Disposition' => 'attachment; filename="' . $fileName . '"', 'Content-Range' => 'bytes ' . $offset . '-' . ($offset + $length) . '/' . $filesize, 'Accept-Ranges' => 'bytes', ); // send partial file wireSendFile($page->mp3->filename, $options, $headers); }else{ // send file wireSendFile($page->mp3->filename, $options); }
-
could be the case.
-
im still puzzled why it works on the same infustructure but different versions of PW.
-
not sure how to do that in PW. But also it's mega strange it works on my v2.7 install but not on v3.
-
related to this topic on wireSendFile(). I've been trying to create a RSS feed for a podcast which i've done previously using PW 2.7.2 with no trouble (e.g. http://machine-ethics.net/), however sitting on the same infustructure a new site (http://www.threepointspodcast.com/) on PW 3.0.42 is having issues validating with itunes with this error from them: Can’t submit your feed. Your episodes are hosted on a server which does not support byte-range requests. Enable byte-range requests and try again. Which is obviously untrue as the other podcast works fine. Just wondering if there's something I need to add in the template settings etc to make it work, I'm currently running the .mp3 file out using wireSendFile() and setting the type to application/mp3 in template settings but with no avail. I'm running nginx. Any help would be appreciated.
-
working now including the <?php namespace ProcessWire; Thanks!
-
Do i have to be explicit in my templates about the namespace?
-
thats the strange thing, found it in there but obviously not getting called from templates for some reason.
-
having errors using wireSendFile() method, was it taken out of PW and if so was it replaced by anything in v3?
-
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hortons.pages' doesn't exist (in /srv/users/serverpilot/apps/hortons/public/wire/core/WireDatabasePDO.php line 439) Getting this error after upgrading from 2.4 to 2.8 then exporting the site profile and installing on the latest version of v3. Anything I could do about this, anyone come across this? thanks Edit: The issues started going from 2.4 to 2.8 - I used the upgrading advice on the github, replacing PW files. Im running ubuntu 14.4.x using serverpilot.io. The site hosting was originally not controlled by me so am trying to rehost and upgrade.
-
Changelog support in ProcessWireUpgrade module
benbyf replied to szabesz's topic in Wishlist & Roadmap
+1 -
i love bringing people together
-
no worries, interesting to know whats out there etc