We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Module: Structure - Uses entries to create a page hierarchy for static and listing pages

Development and Programming

Casey Reid's avatar
Casey Reid
82 posts
16 years ago
Casey Reid's avatar Casey Reid

I’m getting an error when I go back in to edit a structure page.

Undefined index: entry_id in /home/system/modules/structure/mod.structure.php on line 1602

Anyone else run into this error?

       
Peter Lewis's avatar
Peter Lewis
280 posts
16 years ago
Peter Lewis's avatar Peter Lewis

Hi, I’ve built a site integrated with Structure, but I’m struggling to get the listings-details pages to work.

Using the example file provided (news-detail.txt) it pulls a single news entry with {exp:weblog:entries}. Your image.

My book listing page is “/books” and can list all the listing entries in one go no problem using the usual {weblog:entries weblog="books" dynamic="off"}.

But the details page ignores the URL and still displays all the entries within the weblog, instead of the specific entry defined by the URL.

So my URL is: “/books/book_title_1” and my code is:

{exp:weblog:entries weblog="books" disable="categories|category_fields|member_data|pagination|trackbacks"}

(I have tried it with just {exp:weblog:entries} and it makes no difference).

I’ve tried using url_title=”book_title_1” in the parameter, but this doesn’t work and can’t be relied on as the admin may change the “Structure URI” within publish-edit, therefore the url_title won’t be the same.

Any ideas what I’m doing wrong?

       
Peter Lewis's avatar
Peter Lewis
280 posts
16 years ago
Peter Lewis's avatar Peter Lewis

Sigh. Worked it out.

I was trying to do the weblog:entries within a JavaScript template (as the information was needed by the JavaScript). On tracing the segment_2 variable, it’s showing the JavaScript template name, instead of the actual URL shown in the browser. Odd as this isn’t the case with embeds, but hey ho.

Works fine and correctly once in a ‘normal’ template.

Doh!

       
johndwells's avatar
johndwells
94 posts
16 years ago
johndwells's avatar johndwells
I’m getting an error when I go back in to edit a structure page. Undefined index: entry_id in /home/system/modules/structure/mod.structure.php on line 1602 Anyone else run into this error?

Yep, I’m seeing this too. It’s appeared since upgrading to 1.2. Doesn’t seem to break anything, but it will no doubt worry my client.

       
rockthenroll's avatar
rockthenroll
485 posts
16 years ago
rockthenroll's avatar rockthenroll

@johndwells @Casey Reid Looking into it now

       
mediasauce's avatar
mediasauce
14 posts
16 years ago
mediasauce's avatar mediasauce

Does anyone know if Structure urls are supposed to be case-sensitive?

I’m using Structure on a site and am getting different results for urls like mydomain.com/About vs mydomain.com/about. I’m unfortunately in the situation where I have to allow for both because this is a rewrite of an existing site and the exceptions are too many to manually handle with .htaccess redirects.

The reason I ask if it’s Structure, is that when navigating to a template file in EE I can use upper or lowercase. I’m hoping changing this might be as easy as adding a strtolower() to a variable in the module.

       
johndwells's avatar
johndwells
94 posts
16 years ago
johndwells's avatar johndwells

Just noticed another error being thrown by 1.2, this time on the actual website rather than the CP area. It reads:

Notice: Undefined variable: html in /folder/to/site/system/modules/structure/mod.structure.php on line 549

It only appears when logged in as Super User. It also appears to only happen when the visiting page has not yet been cached (I’m caching entire templates); upon a reload the notice disappears.

It also only occurs on “child” pages. Note though that my site is only 2 levels deep, so I can’t say what happens for children’s children…

       
Peter Baker's avatar
Peter Baker
49 posts
16 years ago
Peter Baker's avatar Peter Baker

Same error over here than @johndwells is getting:

"Notice: Undefined index: entry_id in /system/modules/structure/mod.structure.php on line 1602"

This line returns “2”

$lwid = $DB->query($sql)->row['weblog_id'];

But “2” doesn’t exist in the listing_wid column in exp_structure for any entries, hence the error when the next query looks for ‘WHERE listing_wid = $lwid’.

       
Nevin Lyne's avatar
Nevin Lyne
370 posts
16 years ago
Nevin Lyne's avatar Nevin Lyne
Nice to see 5+ support, too bad it wasn’t in originally - we already changed hosts! Sorry EH!

No problem, Brian. Because we base our infrastructure on Redhat Enterprise Linux, deviating from packages it provides axes our commercial support from them. Doing outside php 5.2.x upgrades then also adds unknowns into our hosting environment between updates for clients looking for stability rather than most resent feature sets too. Only problem is their development cycle really is designed for enterprise computing. This type of cycle is slow as we can see enterprises still using IE 6 that is over 5 years old, and will not upgrade as a good example of enterprise upgrade policies.

We are investigating other options, always, actually, but working with Travis on this was a much faster solution, and might help others too using other hosting also working without 5.2.x A fair win-win on both fronts 😊

Thank you again, Travis!

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

I’m just sorry I had to switch - you guys are great 😊

       
Peter Baker's avatar
Peter Baker
49 posts
16 years ago
Peter Baker's avatar Peter Baker

One more error:

Notice: Undefined variable: html in /system/modules/structure/mod.structure.php on line 549

When using parent_title tag (even though it seems to work and displays the parent title):

{exp:structure:parent_title}
       
rockthenroll's avatar
rockthenroll
485 posts
16 years ago
rockthenroll's avatar rockthenroll

@mediasauce yes, URLs are case sensitive. SOryr about the errors, guys, we’re working on testing and fixing.

       
Andrew Waegel's avatar
Andrew Waegel
16 posts
16 years ago
Andrew Waegel's avatar Andrew Waegel

Hey there,

New to using Structure and I’m getting red ‘ERROR’ message when dragging the menu items. It worked with v.1.1.1, but seemed to break after updating to 1.2.

In Firebug when i inspect the response from the ajax calls, it’s just returning the menu page - shoudn’t it be JSON encoded data?

Here’s what firebug reports as the results page: GET http://mysite.com/qmadmin/index.php?ACT=20&type=prevSibling&eid=28&pid=96&nid=17 200 OK 864ms

I checked to make sure action #20 is defined in exp_actions (it is).

…any ideas?

       
Andrew Waegel's avatar
Andrew Waegel
16 posts
16 years ago
Andrew Waegel's avatar Andrew Waegel

In the ‘solving my own problem’ department, this is fixed. I had altered structure.min.js to edit the structure_saveMove function as referenced in an earlier reply, but I put the admin control panel path there (‘qmadmin’ in my case).

I removed that from the URL in the previous post and voila, action 20 fires and I get the JSON results, and everything’s good.

Also FWIW in the structure_saveMove function I had to delete ‘structure_settings.site_path’ - it was returning ‘undefined’ and thus breaking the ajax url.

       
Emily Heath's avatar
Emily Heath
197 posts
16 years ago
Emily Heath's avatar Emily Heath

recap of problem i had

I set up the Structure module fine and it was working for me, but when my client/Administrator (who is in a different member group) added new listings, the page_uri was wrong. Instead of giving the URI ‘section/name-of-entry’, it gave the URI just as ‘name-of-entry’ so obviously the link didn’t work. Turns out this was happening because I had set the Permissions in the Structure > Settings to NOT allow this member group to “View publish/edit Structure tab” (since the Structure URI gets auto-created from the Title I didn’t think they needed to see that). Now I have checked this box to allow them to view it, when they add a new entry now the URI path is correct.

@rockthenroll it doesn’t make sense when you say to

just make sure people have proper permissions and it will work.

because what that means is that you MUST have specific permissions in order for it to work, therefore they are not optional permissions, they are requirements. Why allow the Member groups not to “View publish/edit Structure tab” if it doesn’t work without them having that permission?

       
First 32 33 34 35 36 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.