Jump to content

adinuno

Members
  • Posts

    41
  • Joined

  • Last visited

Posts posted by adinuno

  1. Hi there,

    I've just installed Processwire and started developing a web page but every time I run [mydomain]/processwire I'm sent to a 404 error page.

    What can I do to diagnose what is causing this issue?

    Thanks in advance

  2. Hi there,

    I have recently transferred my Processwire to a different host. I have created a database and imported to the new host server and have transferred all the files Processwire. I have also created a database user and updated the config.php file with the necessary information and I am getting the following error in debug mode:
     

    Fatal error: Exception: DB connect error 1045 - Access denied for user 'admin'@'192.249.113.81' (using password: YES) (in /home/admin/public_html/wire/core/ProcessWire.php line 96) #0 /home/admin/public_html/wire/core/ProcessWire.php(45): ProcessWire->load(Object(Config)) #1 /home/admin/public_html/index.php(183): ProcessWire->__construct(Object(Config)) #2 {main} in/home/admin/public_html/index.php on line 214
    This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged.

    Any clues of what is happening? Can anyone please help me?

     

    Thanks

  3. Hi there,

    Is there anyway in processwire to output the URL of the site, instead of the root. Because the root returns this value: "/" and I need it to return the URL.

    Thanks in advance ;)

  4. That "$page->child->children->children" is the issue here; $page->child is a Page, $page->child->children is a PageArray and you can't ask for children of a PageArray.

    PageArray contains Pages, each of which has children -- PageArray itself doesn't have children. You'll have to iterate over all contained pages one by one and ask for their children :)

    <?php
    foreach ($page->child->children as $children) {
        foreach ($children->children as $child) {
            echo "<h1>{$child->url}</h1>";
        }
    }
    ?>
    

    Does this make sense to you?

    Yes it does, I actually thought the same way before and tried to do it, but I must've messed up my logic.

    That works and is very simple to understand, pure javascript logics.

    Thank you very much ;)

  5. Hi there,

    First of all, I am sorry for the spam of small questions, but as they are all very simple and fit for my problems, they can as well fit for someone else's problems too.

    I am testing around the $page->children function and I wanted to find all the children inside the children of the page's first child.

    It is a bit complicated to explain, but I'll illustrate the situation:

    first level

    - > second level

    - - - > third level

    - - - - - - > fourth level

    - - - > third level

    - - - - - - > fourth level

    - - - - - - > fourth level

    - - - > third level

    If we read this list as a page tree, I want to find the url of each "fourth level" page.

    I have tried the most logical yet with no success:

    <?php foreach( $page->child->children->children as $children) { ?>
       <h1><?php echo $children->url ?></h1>
    <?php } ?>
     

    What am I doing wrong?

    In JQuery terms I could navigate through my levels with the $(this).parents()[5] function, but Processwire seems to lack this capability.

    Thanks in advance

  6. Hi there,

    I am struggling with a very simple variable. I'm using the following function to get the url of a certain child:

    <?php echo $page->find("projects")->url ?>
     

    But it returns an error:

    Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Selectors.php line 165)
    
    #0 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Selectors.php(190): Selectors->create('projects', '', '')
    #1 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Selectors.php(63): Selectors->extractString('has_parent=1, p...')
    #2 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Pages.php(143): Selectors->__construct('has_parent=1, p...')
    #3 [internal function]: Pages->___find('has_parent=1, p...', Array)
    #4 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Wire.php(271): call_user_func_array(Array, Array)
    #5 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Wire.php(229): Wire->runHooks('find', Array)
    #6 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Page.php(786): Wire->__call('find', Array)
    #7 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Page.php(786): Pages->find('has_parent=1, p...', Array)
    #8 /Applications/XAMPP/xa
    
    This error message was shown because you are logged in as a Superuser. Error has been logged.
     

    The page called 'projects' exists, what could be the problem?

    Thanks in advance :)

  7. Hi there,

    I need a radio button fieldtype.

    The checkbox field only allows one value, right? I need a field that displays a list of radio buttons, in which the user has to pick one.

    Is this available through processwire? How can I do something like this?

    Thanks in advance ;)

  8. let it be pages. easier to maintain, better performance (in case there are a lot of articles), accessible for future development of your site.

    But how can I get the fields within the pages to display them on the single-page (the only page on the site)?

  9. Hi there,

    I have a single page website. This single page website has a section that includes posts that have their own content already displayed on the page.

    What do you recommend, should it be best to maintain the repeater structure or should I make this section based on pages?

    (you can think of this like a blog, but the content is already within the main page, thus making it a single-page website)

    Thanks in advance ;)

  10. PW uses bitwise operators for setting flags. It does the same thing for the page status field (ie hidden, unpublished, trash etc). You can see the various values for each flag at the top of this file:

    https://github.com/ryancramerdesign/ProcessWire/blob/a8024bb49785370aa2e3867bd683094663cfeabf/wire/core/Field.php

    The values are added together and stored in the flags field, which is why you saw a 5 = autojoin (1) + global (4)

    Hope that helps.

    Oh yeah, it makes sense now. Thank you so much ;)

    SOLVED!

    • Like 1
  11. The autojoin option is stored in the fields table as a flag. Most likely you'll see a '1' in the flag field for the relevant field. Change it to '0' and it will remove the autojoin. Keep in mind that I haven't tested autojoins with repeater fields - maybe autojoin and repeaters is not supported? Anyway, hopefully you can fix it with the DB change. 

    I went in the fields table in my DB and the field in question had a number 5 in as the value of flags (not 1). What should I change this to? What does this mean?

  12. Hi there,

    Today I was testing Autojoin and Global features on fields. I have a repeater field and I activated Global and Autojoin and processwire now shows the following message:

    Unable to complete this request due to an error. Error has been logged.
     

    The error log was this:

    2013-10-31 01:36:08    ?    http://localhost/?/    Error:     Exception: Could not execute User::__construct() (in /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Pages.php line 323)
     

    How can I solve this problem? I have searched the site database, but I couldn't find this option the autojoin option to toggle it manually.

    Thanks in advance :)

  13. Sorry, i was calling it by the wrong name. Details tab: Entity encode file description/tags?

    I have tried this with that option checked and unchecked. The result is the same, I upload the image and it changes from it's original name image@2x.png to image_2x.png

    Any other solutions on this?

×
×
  • Create New...