Jump to content
  • 0

Multicraft docs are they out of date?


Jackis18

Question

On the Multicraft Docs page, it states that you can make login credentials send out only once although the code on that page does not work.
 
{% if service.multicraft_login_username %}
Login with
User: {service.multicraft_login_username}
Pass: {service.multicraft_login_password}
{% else %}
Login using your existing Multicraft account credentials.
{% endif %}
 
This code returns an error, "Template parse error:  if service.multicraft_login_username tag doesn't exist"
 
How can I get this working?
 
Thanks
Jack
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
16 minutes ago, Jackis18 said:
On the Multicraft Docs page, it states that you can make login credentials send out only once although the code on that page does not work.
 
{% if service.multicraft_login_username %}
Login with
User: {service.multicraft_login_username}
Pass: {service.multicraft_login_password}
{% else %}
Login using your existing Multicraft account credentials.
{% endif %}
 
This code returns an error, "Template parse error:  if service.multicraft_login_username tag doesn't exist"
 
How can I get this working?
 
Thanks
Jack

You may be right my fellow. Could you please look into a pre created Multicraft package on Blesta end and posting a screenshot of the "Welcome Email" section? It will be just beneath where you set the pricing of various terms.  

That may hint us what "variables" exists within the latest module. :)

Link to comment
Share on other sites

  • 0
11 minutes ago, Jackis18 said:

image.thumb.png.60d596efc2f56faee9d0f61424d0f45a.pngimage.thumb.png.1ae70b5b4199fca687498a5488efd37f.png

 

There is the exact error and welcome email I am trying to setup - with all the module variables aswell.

 

Thanks

Jack

I think I thought of what possibly be the problem...  

There obviously two "kinds" of "variables" that looks very similar the one your trying to use ( service.multicraft_login_username) and another of one that looks very similar (service.multicraft_user_name). With that said...  

Could you please see what happens if you swap service.multicraft_login_username for service.multicraft_user_name ?  I am thinking that one may be valid while the other one may been "removed" from Multicraft/Blesta but had not been updated on the docs/module "variables" listing.  

Please let us know the result and thanks in advance.  

 

Link to comment
Share on other sites

  • 0
On 1/16/2018 at 8:16 PM, Jackis18 said:
{% if service.multicraft_login_username %}
Login with
User: {service.multicraft_login_username}
Pass: {service.multicraft_login_password}
{% else %}
Login using your existing Multicraft account credentials.
{% endif %}
 
This code returns an error, "Template parse error:  if service.multicraft_login_username tag doesn't exist"

Based on the template parse error you received, I think you pasted that code into the WYSIWYG as HTML, so the WYSIWYG encoded the text as HTML. When pasting code, it is best to do so in "Source" mode--that is, you click the "Source" button in the WYSIWYG so you can see the HTML source, and that's where you paste the code. If you see any HTML-encoded characters like   or % in between template tags then some of the characters were inadventently HTML-encoded and will cause a parse error.

A valid conditional tag would not have any HTML-encoded characters, e.g.:

{% if service.multicraft_login_username %}

But while it may look correct in HTML, it may be wrong Source mode (which is what matters). If the spaces were HTML-encoded, Source mode would show:

{% if service.multicraft_login_username %}

In this case, the spaces were HTML-encoded to  , which is invalid syntax for tags and causes a parse error.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...