Skip to content
This repository has been archived by the owner on Dec 18, 2020. It is now read-only.

Internal_links in pages breaking #707

Open
piratadelfuturo opened this issue Jun 4, 2016 · 1 comment
Open

Internal_links in pages breaking #707

piratadelfuturo opened this issue Jun 4, 2016 · 1 comment

Comments

@piratadelfuturo
Copy link

piratadelfuturo commented Jun 4, 2016

Q A
Bug? yes
New Feature? no
Sulu Version 1.2

Actual Behavior

If i have a page named halls.xml and then in another page I add the following without having any content without this kind of page:

                <property name="halls" type="internal_links">
                    <meta>
                        <title lang="fr">Halls</title>
                        <title lang="en">Halls</title>
                    </meta>
                </property>

I get the following error:

Stack Trace
in vendor/sulu/sulu/src/Sulu/Component/Content/SmartContent/QueryBuilder.php at line 362   + 
at ErrorHandler ->handleError ('2', 'Invalid argument supplied for foreach()', '/var/www/pmg/pmg_social/vendor/sulu/sulu/src/Sulu/Component/Content/SmartContent/QueryBuilder.php', '362', array('idsWhere' => array())) 
in vendor/sulu/sulu/src/Sulu/Component/Content/SmartContent/QueryBuilder.php at line 362   + 
at QueryBuilder ->buildPageSelector () 
in vendor/sulu/sulu/src/Sulu/Component/Content/SmartContent/QueryBuilder.php at line 138   + 
at QueryBuilder ->buildWhere ('www_plazacentreville_com', 'en') 
in vendor/sulu/sulu/src/Sulu/Component/Content/Query/ContentQueryBuilder.php at line 147   + 
at ContentQueryBuilder ->build ('www_plazacentreville_com', array('en')) 
in vendor/sulu/sulu/src/Sulu/Component/Content/Query/ContentQueryExecutor.php at line 66   + 
at ContentQueryExecutor ->execute ('www_plazacentreville_com', array('en'), object(QueryBuilder)) 
in vendor/sulu/sulu/src/Sulu/Bundle/ContentBundle/Content/InternalLinksContainer.php at line 140   + 
at InternalLinksContainer ->loadData () 
in vendor/sulu/sulu/src/Sulu/Bundle/ContentBundle/Content/InternalLinksContainer.php at line 117   + 
at InternalLinksContainer ->getData () 
in vendor/sulu/sulu/src/Sulu/Bundle/ContentBundle/Content/Types/InternalLinks.php at line 207   + 
at InternalLinks ->getContentData (object(Property)) 
in vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Resolver/StructureResolver.php at line 78   + 
at StructureResolver ->resolve (object(PageBridge)) 
in vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Resolver/ParameterResolver.php at line 57   + 
at ParameterResolver ->resolve (array(), object(RequestAnalyzer), object(PageBridge), false) 
in vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Controller/WebsiteController.php at line 86   + 
at WebsiteController ->getAttributes (array(), object(PageBridge), false) 
in vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Controller/WebsiteController.php at line 53   + 
at WebsiteController ->renderStructure (object(PageBridge), array(), false, false) 
in vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Controller/DefaultController.php at line 40   + 
at DefaultController ->indexAction (object(PageBridge), false, false) 
at call_user_func_array (array(object(DefaultController), 'indexAction'), array(object(PageBridge), false, false)) 
in app/bootstrap.php.cache at line 3206   + 
at HttpKernel ->handleRaw (object(Request), '1') 
in app/bootstrap.php.cache at line 3168   + 
at HttpKernel ->handle (object(Request), '1', true) 
in app/bootstrap.php.cache at line 3319   + 
at ContainerAwareHttpKernel ->handle (object(Request), '1', true) 
in app/bootstrap.php.cache at line 2509   + 
at Kernel ->handle (object(Request)) 
in web/website.php at line 63   + 
@danrot
Copy link
Contributor

danrot commented Jul 4, 2016

First of all it is really strange that Sulu is hitting the SmartContent namespace in this case, but that does not seem to be the problem.

Have you overridden any of the services on your own? If you really have no items selected this line should prevent the code from your stacktrace being called.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants