Tagged: demo
- This topic has 17 replies, 5 voices, and was last updated 7 years, 12 months ago by
Marcus.
-
AuthorPosts
-
-
February 7, 2014 at 10:42 am #1332
JasonKeymasterIt would be extremely useful if the add-on demo could be enabled while working on a theme. If I add the /theme/piklist directory while the demo is enabled it breaks everything piklist related. I have a feeling this is a known issue, but I wanted to put a vote for having these work together. As I’m working to get familiar with Piklist the demo is very useful, and having to disable it in order to see how my own work is coming along makes it considerably more difficult.
Thanks!
-
February 7, 2014 at 10:55 am #1334
-
February 7, 2014 at 11:11 am #1337
-
February 7, 2014 at 11:32 am #1338
JasonKeymasterJust realized I didn’t add the screenshot links. They’re now in the previous post. I just wrote this to update the freshness. ๐
-
February 7, 2014 at 12:10 pm #1339
MarcusMemberJason, it probably has to do with the fact your on a windows machine like me.
Try this if you’re willing.
In class-piklist.php file in the includes directory of piklist, edit line 144 which is part of the add_plugin function:Change this line:
self::$paths[$type] = $path;To this:
self::$paths[$type] = (stristr($path, ':\\') || stristr($path, ':/'))?str_ireplace('/', '\\', $path):$path;And see if that takes care of it.
I haven’t played around with 0.90 just yet, as I tend to devote a lot of time to it each time a new release comes out, but I do remember this error from an old piklist install.I hope this works for you.
Marcus
-
February 7, 2014 at 1:06 pm #1340
JasonKeymasterHey Marcus!
It definitely has to do with Windows being stupid. It appears to be permissions issues, but putting everything to max permissions does absolutely nothing. This is very frustrating.
Thanks for the line of code, but unfortunately it didn’t fix the problem. ๐
This work on my colleague’s mac and on the server, but I really need this to work locally.
-
February 7, 2014 at 2:01 pm #1342
JasonKeymasterThis is a serious show stopper for me. Can anyone from Piklist please chime in on this? I’m spending a lot of time trying to figure this problem out. I’d really like to use this framework.
I know it’s in beta. Should I just assume it’s not ready?
-
February 9, 2014 at 12:54 am #1353
MarcusMemberJason, try a couple of these things, as I’ve got a local WAMP development and I got mine working.
Make sure of your pathing first of all.
Put piklist as a plugin in the plugins directory, and activate it.
Any meta boxes go in your theme directory, under piklist/parts/meta-boxesIn the piklist file includes/class-piklist.php find the lines that say:
if (isset(self::$paths['theme'])) { if (file_exists(self::$paths['theme'] . $_part)) { $_file = self::$paths['theme'] . $_part; } }And replace them with this:
if (isset(self::$paths['theme'])) { if (stristr($_part, ':\\') || stristr($_part, ':/') || stristr(self::$paths['theme'], ':\\') || stristr(self::$paths['theme'], ':/')) { $together = (stristr($_part, ':\\') || stristr($_part, ':/') )?$_part:str_replace('/piklist','',self::$paths['theme']).'/' . $_part; } else { $together = self::$paths['theme'].$_part; } if (file_exists($together)) { $_file = $together; } }Try that and see if you solve it.
Marcus
-
February 10, 2014 at 10:49 am #1356
JasonKeymasterHi Marcus,
I really appreciate your help. Unfortunately, I’m not able to find anything in class-piklist.php that has self::$paths[‘theme’] anywhere in the file. I’m finding self::$paths[‘piklist’], but not self::$paths[‘theme’]. Are you you using 0.9.1?
Thanks!
-
February 10, 2014 at 11:07 am #1357
JasonKeymasterAh, ok, they changed from the hardcoded, ‘theme’, to a private variable $_theme.
Unfortunately, this didn’t fix my issue. I’m still told I have permission issues on the line:
include $_fileI’ve gone against my better judgement, though, and have completely opened all permissions on every file/directory in the path C:\wamp\www\papertower\dhae\wordpress. I’ve also read, while searching around for this, that the permissions error is often a red herring for another error in the code.
To be completely explicit:
- I’m running wamp 2.4 on Windows 8.1
- I have Piklist 0.9.0 active as a plugin
- The problem only occurs when I add the /piklist directory to /themes/custom/
- Error #1: Warning: include(C:\wamp\www\papertower\dhae\wordpress\wp-content\themes\custom): failed to open stream: Permission denied in C:\wamp\www\papertower\dhae\wordpress\wp-content\plugins\piklist\includes\class-piklist.php on line 283
- Error #2: Warning: include(): Failed opening ‘C:\wamp\www\papertower\dhae\wordpress/wp-content/themes/custom/’ for inclusion (include_path=’.;C:\php\pear’) in C:\wamp\www\papertower\dhae\wordpress\wp-content\plugins\piklist\includes\class-piklist.php on line 283
- What really puzzles me about the last error is that I don’t have a C:\php directory. I did once, but I got rid of it since wamp has it. I did remove it from PATH.
-
February 10, 2014 at 12:12 pm #1358
MarcusMemberSorry Jason, my fix was for 0.8 not 0.9
I figured you must be having the same problem I did, as you have a very similar setup and thats how I fixed mine.I still believe it comes back the $_theme variable as I can see you’ve got mixed / and \ in your paths.
Which is what is stopping you from piklist seeing valid theme paths.
When I rip 0.9.1 apart (its been a long week) I’ll look at that specific issue and see if I can fix it.If you get to it before I do, then please post your results. ๐
Thanks Jason.
Marcus
-
February 10, 2014 at 12:28 pm #1359
JasonKeymasterGotcha. I was under the impression that windows permitted paths with mixed dashes. Not, of course, in command prompt, but something between apache and php in windows. I barked up that tree in the past with another project and found it was a red herring.
If I happen to get it working on 0.9.1 I’ll be sure to post it. Thanks!
~Jason
-
February 12, 2014 at 9:34 am #1374
vslijkermanMemberI have similar problems on localhost, Error #1 and Error #2 specified above by Jason.
On my live site, there’s no problem at all.Is there any way to get Piklist working in a local environment?
-
February 12, 2014 at 11:09 am #1376
JasonKeymasterTo be perfectly honest, the issue ended up being the straw that broken the camel’s back of Windows for me. This in addition to cygwin and other nonsense tipped me over. I’ve since then split the partition and installed Ubuntu and now use Linux as my primary work OS. Now Piklist is working perfectly fine locally.
Still, this seems like enough of an issue that Piklist really ought to look into it themselves. I suspect this issue does pop up on Windows servers.
-
February 12, 2014 at 9:31 pm #1390
KevinKeymasterJason-
Agreed, I am waiting on a windows machine to do just that with… we love macs here at Piklist ๐
Thanks
Kevin
-
February 13, 2014 at 10:02 am #1393
JasonKeymasterI hear you, Kevin. I’m the only person not working from a Mac in my company. I was going to get one after all this.. but I don’t want to drop $1500. So I switched to Ubuntu instead. It’s really the unix core I’m after anyway. ๐
-
February 14, 2014 at 12:37 pm #1405
MarcusMemberFIXED IT!!!!
The day has come and I’m loving the new piklist. I was just waiting until I had some free time (or rather some extra time) to sit and dwell with the new piklist. And I love it.
Most importantly I got it working on Windows Jason. (man I hate windows, microshaft kills me)
includes/class-piklist.php
Same fix as the first part I suggested Jason:
public static function add_plugin($type, $path) { self::$paths[$type] = (stristr($path, ':\\') || stristr($path, ':/'))?str_ireplace('/', '\\', $path):$path; // EDIT MARCUS EBY $path = str_replace(chr(92), '/', $path);But a little below that is the render function and these lines:
foreach (self::$paths as $_display => $_path) { $_file = (path_is_absolute($view) ? $view : self::$paths[$_display] . $_path_seperator . 'parts' . $_path_seperator . $view) . (strstr($view, '.php') ? '' : '.php');Just add the following right after:
foreach (self::$paths as $_display => $_path) { $_file = (path_is_absolute($view) ? $view : self::$paths[$_display] . $_path_seperator . 'parts' . $_path_seperator . $view) . (strstr($view, '.php') ? '' : '.php'); $_file = (stristr($_file, ':\\') || stristr($_file, ':/'))?str_ireplace('\\', '/', $_file):$_file; // EDIT MARCUS EBYIf you notice the search and replace is almost identical to the first, except for one small difference. This replaces the ‘\’ with a ‘/’ and the first one replaced the ‘/’ with a ‘\’ (go figure, stupid windows)
(please don’t add the EDIT MARCUS EBY, I just do that for grep searches. So I know I’ve hacked Kevin’s masterpiece of coding)
Voila, it shall work in windows. ๐
Hope that fills a need for anyone else out there looking for a windows solution.
Marcus
-
February 15, 2014 at 5:56 am #1408
MarcusMemberTurns out more needed to be fixed, and it conflicts with what I posted here.
Put the new code on Gist:
https://gist.github.com/anonymous/9016756And commented on the four lines I changed at the bottom of the gist.
Marcus
-
-
AuthorPosts
- You must be logged in to reply to this topic.