Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Sort order incorrect, category links missing and pagination not working on a blog category template

Status Resolved
Add-on / Version Publisher Lite 2.7.0
Severity
EE Version 3.5.11

derek allard

Jan 04, 2018

Description:

On this page: https://beta.gocanvas.com/content/blog/category/case-studies we are running into two issues:

First issue is the ordering of entries is not correct.  It should match how the normal blog is done, this category list of blogs is not sorted correctly (the categories are missing from the tags on each list item).  The first one has a date of 2011.

Pagination is not working, this is clicking on page 3, and the same article is at the top (the one from 2011).  In addition the number of items on each page is too high.

I spent some time this morning and found that the category fields were disabled which got the categories to render on the tags.  However I can’t seem to get the order to change no matter what (explicitly stating sort by date and desc does nothing)

The template in question is blog/index and I know I’m working on the right one as I added the TEST to the title and it renders.

Am looking for some direction on this as to what is happening.  I may need to have you whitelisted as client is very strict about server access.  Please pass along and I’ll make that happen.  (They also use a ssl key if you need FTP access).

For the FTP: Port: 1291 Path: /var/www/html/expressionengine


I HAD OPENED THIS TICKET WITH ELLISLAB ORIGINALLY AND HERE WAS THERE REPLY:

It looks like Publisher is doing something very odd.

I put up a simplified test template: https://beta.gocanvas.com/content/blog/rob1/category/case-studies

It ignores the page limit and the order is wrong.  I flipped on debugging and I can see 2 queries to get the data to show.  One is correct- with correct order and limit.  The other isn’t.

If I disable just the publisher extension and refresh the page, the order and limit are correct.

It’s just odd to me this is happening, as it’s a pretty standard tag setup and I’d expect that if it were a typical bug it would have been addressed long ago.  So- that bit seems odd.  But definitely the first thing to do is make sure you’re on the current version of Publisher and if that’s not it, pull in BoldMinded and have them take a look at what’s going on.

Make sense?  Keep me in the loop, but this definitely looks like a Publisher extension issue.


Detailed steps to reproduce the issue:
1. Go to https://beta.gocanvas.com/content/blog/category/case-studies
2. See the issues with pagination, order and category tags
3. Template in question is blog/index

 

#1

BoldMinded (Brian)

Derek, can you try updating to 2.7.3? I made some improvements to the queries in 2.7.2 and 2.7.3. Hopefully it addresses your issue.

#2

derek allard

Hi Brian … I will get the updated version from the client and install and keep you posted.

#3

derek allard

Hi Brian … Publisher Lite has been upgraded to 2.7.3 … I just cleared all the caches and reloaded and the issues are still present. Am not noticing any change.

#4

BoldMinded (Brian)

Can you do a few things for me?

  1. Can you paste in here the queries you’re referring to?

  2. In that same test template, can you put in the template code to get the desired results you’re referring to in “how the normal blog is done” so I can compare on the same page? If you can’t do it in the same template, make another test template that is bare bones so I can compare the two.

  3. Make sure CE Cache is not affecting the output from that test page.

#5

derek allard

Hi Brian … of course.

First, here is the query from the blog/index template … what it is outputting doesn’t match what this query is asking it to do:

{exp:channel:entries channel="blog" limit="10" disable="member_data" orderby="date" sort="asc"}
                <div class="border-bottom media p-h-lg">
                    <div class="col-xs-12 col-sm-3">
                     {exp:ce_img:single src="{blog_thumbnail}" class="img-responsive thumbnail" width="175" fallback_src="/content/images/image-uploads/canvas-fallback.jpg"}
                   </div>
                   <div class="media-body">
                     <h4><a href="http://{url_title_path=">TEST4 {title}</a></h4>
                     {bsummary}
                     <div class="m-t-xl media">
                        {exp:ce_img:single src="{avatar_url}" width="50" height="50" filter="grayscale" crop="yes" class="img-responsive pull-left" fallback_src="/content/images/image-uploads/sml-canvas-logo.png"}
                         By <strong>{author}</strong> on {entry_date format="%F %j, %Y"}
                         <div>
                                <small class="text-bold">Tags: </small>
                         {categories show_group="not 4" backspace="2"}<a href="http://{path=blog}">{category_name}</a>, {/categories}
                       </div>
                     </div>
                   </div>
                 </div>
                {paginate}
                 <div class="m-t-md text-right">{pagination_links}
                     <ul class="pagination">
                      {previous_page}<li class="prev previous_page"><a href="http://{pagination_url}"><i class="fa fa-chevron-left"></i></a></li>{/previous_page}
                      {page}{if current_page}<li class="active"><a href="#rel=start">{pagination_page_number}</a></li>{if:else}<li><a href="http://{pagination_url}">{pagination_page_number}</a></li>{/if}{/page}
                      {next_page}<li class="next next_page "><a href="http://{pagination_url}"><i class="fa fa-chevron-right"></i></a></li>{/next_page}
                    </ul>
                    {/pagination_links}</div>
                {/paginate}
              {/exp:channel:entries}

On the second point … The “how the normal blog is done” is using the same code, which is further stumping me. I did just go ahead and take that same code as listed above and put it into a test template and you can see the different output: https://beta.gocanvas.com/content/_test/

On the third point … I did clear CE Cache twice before adding the previous note to the ticket and just did it again here.

#6

BoldMinded (Brian)

So basically when “category/case-studies” is in the url, it doesn’t work correctly? Thus its an issue with category based queries.

#7

derek allard

Hi Brian … If Publisher is disabled it works correctly so I think the issue is with Publisher and not EE categories.

#8

BoldMinded (Brian)

yes, its definitely a Publisher issue, but its with how Publisher handles the queries when its a category based entries tag.

#9

BoldMinded (Brian)

I’ve got quite a few tickets in my backlog right now… seems everyone was quiet over the holiday break and now getting back to work. I might not be able to dive into this until early next week.

#10

derek allard

Hi Brian … That will be fine. I will make the client aware.

#11

BoldMinded (Brian)

The FTP info provided doesn’t work.

#12

BoldMinded (Brian)

FYI, I’m unable to replicate this locally, and I can’t debug the dev site until the FTP is working.

Using the same entries tag you have, but sifferent channel name, I can list entries in a category, in the correct order, and with working pagination. It would appear its an issue only with your site from what I can tell. Have you tried backing up the db, and uninstalling all other add-ons except Publisher to see if its a conflict of some sort? Also make sure there is no caching enabled. I see CE Cache is installed.

#13

derek allard

Good morning, Brian … what is your IP address. The client will need to whitelist your IP and have you set up a secure key as well to get the FTP to work for you. Please advise.

#14

BoldMinded (Brian)

I won’t be able to get you an IP until later tonight.

#15

derek allard

OK. Thanks for letting me know.

#16

BoldMinded (Brian)

Comment has been marked private.

#17

derek allard

Good morning, Brian. I have sent the IP / IP range to my client and as soon as they have things setup I’ll be in touch.

#18

derek allard

Comment has been marked private.

#19

derek allard

Comment has been marked private.

#20

BoldMinded (Brian)

Comment has been marked private.

#21

derek allard

Hi Brian … Yes, they have some pretty intense security on their server. I did send you the private key via email yesterday as well and just resent it to that address again for easy access.

#22

BoldMinded (Brian)

Derek, I can get into the server, but the user does not have permission to edit any files.

#23

derek allard

Hi Brian … Ugh. I just sent an urgent request to their server admins to get you permissions to edit the files. Will update this as soon as I hear back from them.

#24

BoldMinded (Brian)

Thanks. At this point I may not be able to look into the issue until this weekend.

#25

derek allard

Understood. This is our fault on the permission issue.

#26

derek allard

Good morning, Brian. Just heard back from the client that you should have permission to everything inside the expressionengine directory on the server. Can you verify that you have what you need now (sometimes their server admins aren’t the most thorough).

#27

BoldMinded (Brian)

Comment has been marked private.

#28

derek allard

Hi Brian … can you let me know specifically what directories the files are in that you will need to edit … They are now saying that they need to set permissions on a folder by folder level for security reasons.

#29

BoldMinded (Brian)

I was trying to edit publisher files, so the addons/publisher directory and all its sub directories.

#30

BoldMinded (Brian)

Are they setting permissions on individual directories, and even sub-directories? If so that seems a little over the top. I’ve worked with a lot of IT folk and haven’t seen that level of restrictions, especially if key based access is required, b/c the key can just be revoked at any time.

#31

derek allard

Hi Brian … the security is very restrictive on their side (we ran into issues repeatedly during development). Seeing as I am just serving as a middle man at this point, could we just add chris.morrisette@gocanvas.com to this ticket and have you work with them directly?

#32

derek allard

I did just request the directories to be given permission to from the client in the meantime.

#33

BoldMinded (Brian)

I don’t want to get in the middle of a security debate 😊 I was just making a general observation. I’ll check the access again later tonight. In the mean time can you check the access with the user you provided me and validate that the files within the Publisher folder are writable?

#34

derek allard

Understood, Brian. Yes, I agree with your general observation. Their setup has caused us a lot of problems all through this project but they are unwilling to consider any alternatives (believe me, I’ve fought this fight as well as others on the EE front with them). I won’t be able to check your key from here as I have my own key and they have them set to the IP address but they are in the process of getting you permissions to the directories.

#35

derek allard

Hi Brian … you should have correct permissions now: “I have set permissions for /var/www/html/expressionengine/system-canvas/user/addons/publisher to have 775 permissions which allows user/group full read/write/execute. Let me know if there are any issues.”

#36

BoldMinded (Brian)

Comment has been marked private.

#37

derek allard

Hi Brian … Just took a look and, yes, things are looking good here now … I made a small tweak to the sort order to show the most recent first but things are rendering properly. Can you let me know what the fix was as I need to give the client instructions to fix this on production (which we can’t have access to). I know I can have them use the modified template code but what about publisher? Did you revise that in someway to make this work? Can they just take the files from addons and move them to production and call it a day?

Thanks for your help and I’ll look forward to your reply.

#38

BoldMinded (Brian)

Sure thing. An if conditional just needs to be moved up a few lines in the EntryResult.php file: https://d.pr/i/Smp1fO/YI8KjdR7Mu

#39

derek allard

Very good. Thank you, Brian. For going forward, am I safe in assuming that this fix will be in future releases so the client doesn’t run into this down the road?

Thank you for your patience working through this one … I realize it is not the ideal setup with the client restrictions but am glad to have this in the rear view.

#40

BoldMinded (Brian)

Yep, the change is already added to the next release.

No worries, I understand. Thank you for getting me access 😊

#41

derek allard

Excellent. Thank you for confirming and thanks again for all your help.

Login to reply