Quantcast
Channel: share.ez.no > Forum topics only
Viewing all 2728 articles
Browse latest View live

What to use instad of symbolic links when using xamp and windows?

$
0
0

Hello..Im new in EZ and  started to create some site using this amazing CMS. I have question. I am referring to one example where i need to create site access folder than inside that folder i should create symbolic links of some .ini file from eng site access folder. Because i am using windows and xamp, i cannot create symbolic links because it is referring to Linux command. What Should i use instead (COPY or to Create Shortcut)
Thank you all


Hello World Bundle

$
0
0

Hi all,

I've been following the tutorial http://granitehorizon.com/Resources/About-eZ-Publish/Creating-Controllers-for-eZ-Publish-5-Platform in an attempt to make my first bundle for EZP5.

I've done everything as it says in this tutorial but when I load the url. I get the Module not found error.

You can see the result of if here http://daniel.clements.id.au/gh/hello/brandon/

I run php ezpublish/console route:debug and from that I receive the following

GHHelloWorldPlain ANY /gh/helloPlain/{name}/{another_name}/
GHHelloWorldPlain2 ANY /gh/helloPlain/{name}/
GHHelloWorld ANY /gh/hello/{name}/{another_name}/
GHHelloWorld2 ANY /gh/hello/{name}/
I then tested the route using php ezpublish/console route:match /gh/hello/brandon and receive:

None of the routes matches

But if I test the route using php ezpublish/console route:match /gh/hello/brandon/ I receive:

Route "GHHelloWorld2" matches

Though when I load http://daniel.clements.id.au/gh/hello/brandon/ I get Module not found.

Is there something simple that I am missing here?

I have also looked over this tutorial http://www.ymc.ch/en/hands-on-ez-publish-5-the-first-symfony-2-bundle-en but it seems to be have been done in the alpha version of EZP5 so I'm not sure if I should pay attention to it.

Thanks for any help you can offer.

Deleting Objects with a Custom State

$
0
0

Hi Guys,

I have a question about custom object states:

The database I work with has a group of custom states for our editorial team. One of those states is "Deleted". This removes the product from the editors view, and the front end, but not from the database.

What I need to do is purge all these "Deleted" products from the DB.

I've tried flatten.php, which uses  eZContentObjectVersion::removeVersions() function to clear the product. However the status of the product in the ezcontentobject_version table  is always 1 (i.e. "live"). The object status in the ezcontentobject table is also set to 1.

What do I need to do to remove all products with a custom state of "Deleted"? (for reference the state id for "Deleted" is 15). The only reference to the "Deleted" state is in the ezcobj_state_link table.

If I move all these items to "Trash", can I then run flatten.php to clear them from the DB? If so, is there an automated way I can search for all objects with a custom state of "Deleted", and move them to trash?

Thanks for your help

js in template

$
0
0

Hi,

I'm on ezpublish, and I have a basic problem :

I have to establish an advanced search.

I have 2 combos box, the first one let you choose a siteaccess,  and the second one should display sub categories of the siteaccess which is selected.

I have a js which redirect and i want to recover the view parameter like -> $view_parameter.mini_site

$("#mini_site").change(function(){
   document.location.href="http://my_website/content/advancedsearch/(mini_site)/"+$(this).val();
});

could you tell me how am i supposed to do to get what i want?

Thanks

 

matthew

Ez5 - Create a form ?

$
0
0

Hello,

I started working with Ez 5. I created custom class in EzAdmin and I want to make a form to let my customer create thoses classes.

Is there a way to generate a form for my class (in the symfony way) ? Because I'm building my form in my twig template with HTML markups and I've lot of validation problem in my controller via the ContentService..What are the best practices to create the form ?

Thank you !

Accessibility, WAI, Opquast and so on...

$
0
0

Hi everyone!

I just would like to ask a simple question: "Is there something planned about accessibility in eZ5 ?"

And if not : what do you think about building a team or any group arround this subject?

Passing attribute to ezxmltext template

$
0
0

Hi all,

I am trying to adapt a ezwebin based site to a ezdemo-based ergo bootstrap based layout. Most things are working so far, but I have trouble with the ezxmltext-view.

When calling the full/frontpage.tpl I call ezpagedata variables concerning the existance of left_menu or extra_menu and evaluate the column with ergo the span-width as follows

 {setscope=global persistent_variable=hash('left_menu', false(),
                                           'show_path', true(),
                                           'extra_menu', true())}{def$columns=16     $col=4}{if$persistent_variable.left_menu}    {set$columns=$columns|sub(4)}{/if}{if$persistent_variable.extra_menu}    {set$columns=$columns|sub(4)}{/if} 
{def$center_col=$columns} 
{def$frontpagestyle='noleftcolumn norightcolumn'} 
{if$node.object.data_map.left_column.has_content}    {set$center_col=$center_col|sub(4)}{/if}{if$node.object.data_map.right_column.has_content}    {set$center_col=$center_col|sub(4)}{/if} 
{if$node.object.data_map.left_column.has_content}    {set$frontpagestyle='leftcolumn norightcolumn'}{/if} 
{ifeq($frontpagestyle, 'leftcolumn norightcolumn')}    {if$node.object.data_map.right_column.has_content}        {set$frontpagestyle='leftcolumn rightcolumn'}    {/if}{else}    {if$node.object.data_map.right_column.has_content}        {set$frontpagestyle='noleftcolumn rightcolumn'}    {/if}{/if} 
COLUMNS {$columns}
COL {$col}
CENTER {$center_col}

The values for COLUMN, COL and CENTER seem to be correct. Afterwards when calling the respective column content I try to pass the column width as an argument as follows

 
{$frontpagestyle} row">{if$node.object.data_map.left_column.has_content}   
{$col}">       
            {attribute_view_guiattribute=$node.object.data_map.left_columncol=$col}       
   
{/if}{if$node.object.data_map.center_column.has_content}   
{$center_col}">       
            {attribute_view_guiattribute=$node.object.data_map.center_columncol=$center_col}       
   
{/if}{if$node.object.data_map.right_column.has_content}   
{$col}">       
            {attribute_view_guiattribute=$node.object.data_map.right_columncol=$col}       
   
{/if}

From what I understand next is called the template content/datatype/view/ezxmltext.tpl. When trying to access the variable as follows:

 COL {$col}{$attribute.content.output.output_text}

I receive error message with

Unknown template variable 'col' in namespace 'xmltagns:ContentView:NodeView:ContentAttribute'

Now my question is if it is possible to generally pass the column width to each ezxmltext attribute called so that I can define the bootstrap-based span-width in each respective call.

Has somebody done something similar or perhaps I have misspelled the topic search within the forum posts. Anyhow I would be very glad if someone could point me in the right direction.

Best wishes

Sebastian

EzPublish5 User login Form

$
0
0

Hi !

I want to let my anonymous user log in. But I don't manage to create a loginform or use the default one.

I've created a custom siteaccess named 'customSiteAccess'. When in my ezpublish.yml, I let default_siteaccess: ezdemo_site I can access to user/login form and log but the user is connected for that ezdemo_site.

When I use  default_siteaccess: customSiteAccess, I cannot access /user/login even if I create a form login from scratch with action : "user/login"...

I don't understand exactly why it's working with ezdemo but not with mine.

in securty.yml :

 providers:        ezpublish:            id: ezpublish.security.user_provider

Maybe the question is where is going 'user/login' ?

Any ideas ?


Printing raw field data in a Twig template

$
0
0

I'm running in to two related limitations with using eZ Data in Twig. 

content.fields in Twig returns an multidimensional array of fields and languages, with each language holding the value to the field. Unfortunately, there doesn't seem to be a way to get the Field object itself, just the values.

This causes problems with two use cases: 

  • Directly outputting text into a tag, say title or meta description. ez_render_field will render a span around the value, and you have to go through the language (hardcoding it into the template) to solve it.
  • Working with image aliases, say for customizing a background image from the CMS using inline CSS. ez_render_field only produces an image tag, and the first parameter to ez_image_alias is field, which is unavailable. 

Is there a way around this I don't know about? If not, I'd propose and ez_field Twig function that simply returns the field object. Thoughts?

eZ5 API content class

$
0
0

Hello,

I am using the new API to create content classes, and I ran into an issue when creating fields of the type ezmatrix. I'm unable to figure out how i specify the default number of rows + define the columns with the new API. 
If anyone has any ideas it would be greatly appreciated.  

ez5 rest api

$
0
0

I'm trying a basic use case, in other words creating a piece of content via the REST API and it fails with a 'database error' exception.

I managed to track it down and it fails in this file:

vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/FieldHandler.php

on line 116 the $this->contentGateway->insertNewField(...) method.

I checked the logs everywhere (apache, mysql, including ezpublish/var/logs) but I don't see any error. (i.e a bad field name or anything like that)

Here is the JSON I'm posting to '/content/objectshttps://gist.github.com/icebreaker/4994187

The content type has only one (required) field and I would expect such a basic thing to work even if the REST API is not considered one of the major selling points.

roleCanRead()

$
0
0

Hello all.

I need to know if a role has content read right on a node.

so i write this... 

But, it's complicated. So can be a better solution.. 

publicstaticfunction roleCanRead(eZRole $role, eZContentObjectTreeNode $node)    {        
 
$section_id=$node->object()->attribute('section_id');        
$sectionRestricted= eZSection::fetchByIdentifier('restricted');        
if($sectionRestricted->attribute('id')!==$section_id){                    
  returntrue;        
}        
$policyList=$role->policyList();        
$node_id=$node->attribute('node_id');        
if(is_array($policyList)&&count($policyList)>0)        {            
foreach($policyListas$key=>$policy)            {               
if($policy instanceof eZPolicy )                {                 
  $section_ok=false;                  
  $node_ok=false;              
  $limitations=$policy->limitationList();       
    foreach($limitationsas$limitation){      
      if($limitation instanceof eZPolicyLimitation ){                 
        if($limitation->attribute('identifier')==="Node"){               
          if(in_array("$node_id",$limitation->allValues())){          
            $node_ok=true;                                
          }            
        }elseif($limitation->attribute('identifier')==="Section"){     
          if(in_array("$section_id",$limitation->allValues())){      
            $section_ok=true;                         
          }            
        }              
      }              
    }                  
    if($section_ok&&$node_ok){    
                    returntrue;     
               }      
          }          
    }     
   }     
   returnfalse;   
 }

allow user to acces to forums

$
0
0

Hi everybody,

I have created a forum using the "forums" and "forum" classes.

Everything works fine when I am connected as an admin.

It get worse when I try to acces the forum connected as "anonmous", I manage to acces the list of discussions of the "forums" class, but when I try to access to a discussion I got a message "you need to authentified to acces the forum". 

I guess I need to define a user policie on the anonymous role.

Do you know how to define it?

thnaks for your help

regards

FA

allow a user to contribute to a forum

$
0
0

Hi everybody,

I have created a forum using the "forums" and "forum" classes.

Everything works fine when I am connected as an admin.

It get worse when I try to acces the forum connected as "anonmous", I manage to acces the list of discussions of the "forums" class, but when I try to access to a discussion I got a message "you need to authentified to contribute the forum".   (

I guess I need to define a user policie on the anonymous role.

Do you know how to define it?

thanks for your help

regards

FA

EzMatrix Attribute

$
0
0

Hi everyone,

I have a custom class with an attribute matrix in it. I'm trying to create a new object of this class in PHP, but I cannot figure out how should I pass the data for the matrix attribute. 

$params = array(

'creator_id'  => '2',                   

'class_identifier' => 'product',                   

'parent_node_id'   => 259,                   

'attributes' => array(

'name' => 'product1',

'color' => 'blue'

//MATRIX DATA?

     )

);

eZContentFunctions::createAndPublishObject($params);

Thank u for your help.


Problem with AliasList in image.ini.append.php

$
0
0

Hi,

i give up. I tried it on ezP 2012.12 und on the brand new ezP 2013.1, but i'm not able to override the AliasList-Array-Items in the image.ini.

I defined in my ezpublish_legacy/settings/override/image.ini.append.php:

[ImageMagick]
IsEnabled=true
ExecutablePath=/usr/bin
Executable=convert

[AliasSettings]
AliasList[]
AliasList[]=headerimage

[headerimage]
Reference=reference
Filters[]=geometry/scaledownonly=2048;320

[foo]
bar[]=test

*/ ?>

This way i can't see my "headerimage" in the array, but i can see my foo-bar stuff. How that? I don't have any image.ini in my siteacces, only in override.

I suppose, i can't override any "injected" settings.

Ez5 - Symfony Forms

$
0
0

Hey Guys,

is it possible, to create forms in Ez5 the Symfony way (see http://symfony.com/doc/current/book/forms.html)? At the moment, I always get following exception:

 An exception has been thrown during the rendering of a template ("Unable to render the form as none of the following blocks exist: "_form_widget", "form_widget".")...

I created the form with following simple code (as shown in http://symfony.com/doc/current/book/forms.html#using-a-form-without-a-class):

 

Controller:

use eZ\Bundle\EzPublishCoreBundle\Controller;
use Symfony\Component\HttpFoundation\Request; 
class DefaultController extends Controller
{    publicfunction indexAction(){        $form=$this->createFormBuilder(array('message'=>'Type message here'))            ->add('name','text')            ->add('email','email')            ->add('message','textarea')            ->getForm(); 
        return$this->render(            'MyAwesomeBundle::content.html.twig',            array('form'=>$form->createView())        );}} 

In the template, I dumped the form object using dump(form) template function and received a valid object from Symfony\Component\Form\FormView. But when I try to render the object using form_widget(form), the mentioned exception appears.

I saw the other Forms Thread (http://share.ez.no/forums/ez-publish-5-platform/ez5-create-a-form) but it didn't answer my question, since as far as I understood, the OP created the HTML form and retrieving of POST values from scratch.What is my mistake?

Or is it impossible at the moment, to create standard Symfony forms?

Thanks in advance, regards!

Ryad

eZ Survey email notifications

$
0
0

I would like my ezsurvey to send an email to the admin each time a user submits. Is this possible? I'm unable to find anything about this in the documentation.

eZTags Priority/Ordering?

$
0
0

I am currently implementing tags on my site for navigation and was wondering if I could change the order of the tags or prioritize them similar to objects within the content structure. I saw a post that described removing them, publishing, then re-adding them in the correct order and publishing but this to me sounds a little trivial. 

I was hoping someone might have a better solution or could inform me if that type of functionality exists within the structure.

runcronjobs.php does not work

$
0
0

I have set up site in ezpublish 4.7 (communitty edition) on test and on production hosting. Both are shared hosting but not the same server. On test server, everything is working but not on production

There are 2 problems:

  1. in kernel/classes/ezscript.php in function updateDebugSettings() . $ini->variable( 'DebugSettings', 'AlwaysLog' ) iz returning false instead of it's value. In the matter of fact, $ini can not return any value. I made some test module with url, and that case, $ini is working as it should.
  2. PHP Fatal error:  Class 'ezcBaseOptions' not found in /srv/site/public_html/kernel/private/options/ezpextensionoptions.php on line 58

I checked ini cache, I checked ini settings in backend (setup->Ini settings), and everything is ok everywhere :(.

Does anyone have any idea what should I look at :(?

Viewing all 2728 articles
Browse latest View live