-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
Glad you got it sorted! Are you able to elaborate more so we can all learn from it? Thanks.
-
Did you confirm file permissions are OK after the restoration? The restoration could have run as a user in a different user group? Is ProcessWire able to read and write where it needs to? Check the server errors logs for more details about what 'this resource is'. What file/folder is it pointing to?
-
@AndZyk are we going to see this in the showcase? :-)
-
No worries...but no need to apologise though ?. It's just a 'community' recommendation not a rule.
-
@Roych The menu you want cannot presently be achieved by using the render() method. For instance, looking at your <li> tags, going down the levels/depth, they have different classes. This is currently not possible in MB but I will add it to my todo list, e.g. a 'levels class'. For custom menus such as yours, it is better to use the getMenuItems() method together with a custom recursive function. Below is an example recursive function that will output the example menu you provided. You can adapt it to your needs if you find it useful. It might need a bit of polishing.
-
@webhoes it is recommended to use the spoiler tags to wrap very long text. I've done this for your post above. Thanks.
-
@Roych. OK. Thanks. I'll have a look.
-
I thought this was the output from echo $menu->render(1022, $options);, hence the confusion. In that case then, please post the 'messy/broken' output that results from echo $menu->render()....
-
Probably. Please copy paste here the original menu HTML that you are trying to replicate.
-
How should it work? What is not working? ? Impossible to tell since we don't know what is not working and what you mean by 'working'. No idea what this means. What do you mean messy? Maybe show us what you are trying to replicate first. Is it broken or does it look broken? What is broken? Looks like valid HTML to me. @Roych, please give a better description and/or illustration of how you want the menu output to appear. Thanks.
-
The go to classic: And this gist by Soma. https://gist.github.com/somatonic/4150974
-
Moderator Note @maddmac I split your question into its own topic as it was not related to the thread where it was (Captain Hook).
- 1 reply
-
- 1
-
-
Moderator Note @combicart Please don't double post. I am sure other forums members have seen your question above and those who have an answer will chip in. I have removed your other topic. Thanks.
-
If you have the time, never hurts to learn a new language. Python is very easy to pick up. You don't need to learn Django or use Python for web dev....there's lots of other stuff you can do with it.
-
I have never used MAMP but the following setup should work... Your MAMP htdocs folder (the one with wire inside), should have a structure like this. site site-blog site-another site-dev wire .htaccess composer.json CONTRIBUTING.md index.config.php index.php LICENSE.TXT README.md Note the index.config.php. Do you have that? Inside it reads: Your index.config.php (that you moved/copied from wire/index.config.php) <?php namespace ProcessWire; /** * ProcessWire multi-domain configuration file (optional) * * If used, this file should be copied/moved to the ProcessWire installation root directory. * * ProcessWire 3.x, Copyright 2016 by Ryan Cramer * https://processwire.com * */ if(!defined("PROCESSWIRE")) die(); /** * Multi-domain configuration: Optionally define alternate /site/ dirs according to host * * If used, this file should be placed in your web root and then edited as follows. * * This function returns an array that should be in the format where the array key * is the hostname (including domain) and the value is the /site/ directory you want to use. * This value must start with 'site-', i.e. 'site-domain' or 'site-something'. This is to * ensure that ProcessWire's htaccess file can recognize and protect files in that directory. * * Note that if your site may be accessed at either domain.com OR www.domain.com, then you'll * want to include entries for both, pointing to the same /site-domain/ directory. * * Each /site/ dir has it's own /site/config.php file that should be pointing to a separate * database. You shouldn't have two different /site/ dirs sharing the same database. * */ function ProcessWireHostSiteConfig() { return array( /* * Some Examples (you should remove/replace them if used). * Just note that the values must begin with 'site-'. * */ 'mydomainblog.com' => 'site-blog', 'www.mydomainblog.com' => 'site-blog', 'anotherdomain.com' => 'site-another', 'dev.mydomain.com' => 'site-dev', /* * Default for all others (typically /site/) * */ '*' => 'site', ); } Each site* will have its own site/config.php, with the correct credentials. ProcessWire will do the rest. Of course, you need all your domains working first, even locally. E.g. dev.mydomain.local, etc. in your hosts file.
- 1 reply
-
- 2
-
-
I had a feeling this was the issue. Excellent! Glad you got it sorted! ?
-
This is getting weirder! Was this a fresh/completely new install? I.e. you didn't import your backup database? If you did import your backup, have you tried with a completely fresh install? Do you still get errors? I am unsure about the steps to reproduce, could you please list them? I.e., Install ProcessWire No errror Install Hanna Code Error? If you get no errors with a fresh database, then your database is probably corrupted. If you get errors with a fresh database/install, then I'd like to try and reproduce that. Thanks for debugging!
-
Good idea but still won't work though (or rather will be malformed, ending up with beginning of time dates) as date field is a datetime field. It requires dates in the format 2015-04-25 09:15:00. Probably easiest if you edit the CSV, e.g. in Excel. Do a search and replace, then tell Excel that column has date values and tell it to change the format to what datetime expects.
-
Hi @Dzung, What is your environment so we can try and replicate (MySQL and PHP). Are there any other errors in the error logs? I am very curious about this. In addition, with respect to one of my commercial modules, a user has reported a duplicate entry MySQL error when they try to install the module. Not quite the same as your case, but a duplicate all the same. I am waiting to find out their server environment.
-
Not to hijack this thread, but recently I experienced something like this. ProcessWire said I had two identical modules but I didn't! A couple of refreshes sorted it out, so I didn't investigate it further.