Jump to content

Raul

Members
  • Posts

    34
  • Joined

  • Last visited

Posts posted by Raul

  1. Hello, 

    I've used this module and I obtain this error too:

    Error:
    Exception: Method TemplateFile::entityEncode does not exist or is not callable in this context (in /www/htdocs/staeding/processwire/wire/core/Wire.php line 320)

    If your are using the demo files as they were, there is an error on the file includes/contact-form.php

    Around the line 62, the follow line:

    echo $this->entityEncode($error, true);

    Must be:

    echo $field->entityEncode($error, true);

    The Method entityEncode belongs to the class InfputField an not to the class Template.

    It worked in PW 2.5.2.

    I hope it can be useful to someone.

    Best regards.

    • Like 1
  2. Hi Soma, 

    Than you for your answer.

    It works.

    I want to do it too much complicated.

    On the other hand:

    I didn't think it's a question for the Fombuilder support forum. 

    From my point of view It's only a question of "Select an option of an InputfieldSelect depending on  an URL parameter".

    If the field is in a fom or not is not relevant for this question.

    I do apologize if I'm mistaken.

    Thank you very much

    Raul

  3. Hi Adrian, 

    Thank your for your answer.

    This would work if I would have made the formular.

    The contact- form has been made with Formbuilder.  Also I don't care of building. I can use only Hooks to modify the results.

    The functionality :

    1.- I have a page with a link (http://processwire/fompage?subject=contact

    2.- I click the link and i get into the form page.

    3.- On the form page I have a select with the options

    <option value="contact">Contact</option>

    <option value="press">Press</option>

    NOTE: This code is generated by Formbuilder

    4.- When I come into the form page, I get the parameter "subject" and try to select te appropiate value of the select field.

    I this case I must select the first value.

    Sorry but I can't say more details because there aren't more details to say.

    Thank you in advance

    Raul

  4. Hello all, 

    I have a contact-form with a select field as Subject.

    The select field is defined as:

    +=

    subject1= THE FIRST Subject

    subject2= THE SECOND Subject

    Now I call the contact-fom from another page with a get parameter "subject" :


    http://processwiresite.com/contact/?subject="subject1"

    I have a Hook defined to process the form "onRender" and I have got the get parameter and sanitized it, etc.

    Now the question is:

    How can I select the option based on the get parameter ?

    Thank you in advance

    Raul

  5. Hi Apeisa, 

    The only way I know is to have a PW2.2.9 and the last german language pack. Latera I have updated PW and all works correctly.

    About the errors, you are right. I'm always in debug mode and thereby I have seen this errors.

    Also, I'm sorry if i have confused someone.

    Thank you for your responses.

    Raul

  6. Hi Ryan, 

    The message was:
     

    Warning: file_get_contents(/var/www/radeberger/wire/core/Password.php) [function.file-get-contents]: failed to open stream: File or directory doesn't exists in /var/www/radeberger/wire/modules/LanguageSupport/LanguageParser.php on line 125

    I'm sorry.

    I have wrote this before the update to PW2.3. Now it's fixed.

    However I think always that the best is to stop the execution as soon as possible. Thereby:

    1.- If a file doesn't exists, it is not necessary to call the parse function. It is not necessary to return an empty array too...Why?

    2.- Calling a function suposes always resources to allocate.

    3.- Moreover, a loop is executed altough an empty array is returned.. Why?

    Yes, the loop has few elements but it's a loop....it has always a cost.

    I don't want suppress errors. Error messages are good, but they can be logged instead of printed.

    You can print a message to advice about them if they have not solution or are important to the execution.

    In this case (parsing files) are the errors or warnings unnecessary, because they don't interrupt the execution and don't cause malfunction.

    They can be avoided easily and logged silently.

    For these reasons, It would be better to put the line before calling the funcion "parseFile".

    Thank you very much for your reply.

    Raul

  7. Hi all, 

    Today I would want to translate my admin area into other language and I have downloaded  the last language pack.

    But I don't have the last version of PW and thereby I don't have all files of the pack.

    What is the result: a lot of warnings because the parser try to parse non-existent files.

    A simple solution could be made in the file "LanguageParser.php" to the function:

    /**
     * Begin parsing
     *
     */
    protected function execute($file) {
     
            if (!file_exists( $file )) return;  <== this line avoid parsing non-existent files.
     
     
    Regards,
    Thanks 
    Raul
  8. Hi, 

    I've noticed that the TinyMCE editor makes a double line when I press the return key.

    Has anybody the same problem?

    In the editor of this forum the behaviour is right.

    What can I do to solve this problem?

    Thanks in advance

    Raul

    P.D: Sorry, I think hier is not the correct place to ask this.

  9. Hello, 

    I use the Datetime field in my current project. I have seen, if I select  "no date/time picker", I obtain a standard HTML Inputfield.

    Is it possible to obtain a HTML5 Inputfield for date instead of a HTML?

    That is:

    I obtain <input type="text"  instead of  <input type="data" ...

    It would be usefull an option to select the output format in order to make native HTML5 pages.

    What code should I change to do it ?

    Thanks in advance.

    Raul

  10. Hi,

    I have used this Fieldtype but I have noticed a strange behaviour.

    Also.

    The field was used in a page and I have selected three values.

    They are saved correct.
    Now I delete two values and they are deleted and the page saved correctly.

    When I try to delete the last value and to save the page, the last value is not deleted.

    Where can be the reason?
    Is there any limitation with this module?

    Thanks in advance

    Raul

  11. Hello Ryan, 

    Thank you for your response. I try to clarify.

    In processwire exists the "Page" field that allow to create a reference to a page.

    I need the same but the reference must be to a form.

    Why?
     

    In the admin area the editor can create forms (with Fombuilder) and these forms have various description fields.

    My idea was to create a template with this fields and one field "Forms" that references a form.

    Yes, I could create pages with the same form name and use the "embed" function of forms but the customer wants diferent names for forms and pages. Moreover the forms aren't created for the same person that creates the page, so this person doesn't know the form name.

    I have used the extension "FieldtypeTemplates" and I have change it to use it with multiple forms (FildtypeForms.module). It runs but i want select only one form.

    I have changed the inputfield from InputfieldAsmSelect to InputfieldSelect (FieldtypeForm.module) but the selected value ist not saved and I don't be sure why.

    I have uploaded the changed files and a file in PDF with the schema. I hope this can help to understand the situation.

    Thank you in advance.

    Raul

    FieldtypeForms.module

    FieldtypeForm.module

    forms_schema.pdf

  12. Hello, 

    I'm using Formbuilder in a project.

    And now I have to build a system to manage forms.

    The system is not simple because there are pages that contain various forms at same time. I try to explain it:

    There is a page that contains variuos forms.

    Each form has an area where the admin can add text fields.

    The formbuilder doesn't allow this text-area but I had an idea to do it.


    The page uses a template "foms-container" and contains

    Template "forms-container" contains
    - Headline (textfield)
    - Description (textarea)
    - "Field Page" restricted to pages with template "form-page" configured as multiple-array

    Template "form-page" contains
     - Repeater with 2 textfields
     - "Field Page" restircted to Forms made with Formbuilder

    And my problem is that the "Field Page" can't be restricted to Forms only to pages.

    Is there any form to do it?

    Can I do it with php.

    Thanks in advance.

    Raul

  13. Hi Soma,

    It works!!

    Thank you very much.

    I don't know exactly what I have made, but it works.

    I think that i had forgotten to create the template "language_.gateway" because i hadn't read from instructions: "...introduced in PW 2.3".  :-[  (I use actually PW 2.2.9)

    Sorry and thanks for the time.

    Raul

  14. Hi Soma,

    Thank you for the answer.

    Yes, the site works without language url module.

    But :
    Why the urls are:


    en/about/

    de/ueber-uns/

    I have only one page "About" and the name of this page is "about".

    Than, What are "about" and "uber-uns" here?

    If I understand right:
    One thing is the Title, where I can write "About", "Ueber uns" etc. and another thing is the name of the page.
    And there I can write only one Name => "about".

    Must I create two diffent pages (english version and german version)?

    Thank you and sory for my clumsiness

    Raul

  15. Hello

    Recently I have installed this extension but  i can't undestand because it doesn't work.

    I have followed the instructions of: https://github.com/mcmorry/PW-language-localized-URL#readme

    I have read all posts of this forum.

    I have read the information about Multilanguage Suport of: http://processwire.com/api/multi-language-support/multi-language-fields/

    But the extension doesn't work.

    No errors, only 404 Page.

    I have severeal questions about the documentation in Github:

    1.- Create a new template "language_gateway" => That is:
       "I must to create ONE template called "language_gateway" or I must to create one template PER language with the name of the language. " 

       
     

        This can be silly, but  Soma commented: "Some common problem I think is that people forget to enable urlSegments on the gateway templates /en/ /it/."

       "What fields must contain this template?"
       "Need I a php file for this Template?" (here: http://processwire.com/api/multi-language-support/multi-language-fields/) it is explained using this php file.

    2.- Create the pages of the website directly below the root page.

       I have the tree:
      

     - Home
        About
        de
        en
    

       The "About" page has Title: "About" and name "about"

       I use FieldtypePageTitleLanguage and the Title in German is "Ueber uns" but the name is equal "about"

       If I write into URL field of the browser: http://localsite/about => I recive a 404 error
       If I write into URL field of the browser: http://localsite/en/about => I recive a 404 error

       If I write into URL field of the browser: http://localsite/About => I recive a 404 error

       If I write into URL field of the browser: http://localsite/de/Ueber uns => I recive a 404 error

    I can't more information to say because I don't recive more information from the system.

    May be is the information unclear?

    Thank you in advance

    Raul


     


     

×
×
  • Create New...