Still having "Load More" issues

Live in development site: https://alpha.gencryo.com

Project file: elementsapp://downloadDocument/T17Arublobi9

Note the “All Services” button and the “More Testimonials” buttons on the home page. These work in local preview, do not work live.

Elements 1.3.5.

I have cleared the directory and re-published all files with no luck. Thoughts?

I have uploaded it to a test server and the load more buttons are working just fine (we use Chillidog hosting). I’m wondering if it’s a server config issue…

Who do you host with?

I host on a VPS, self-managed. My first suspicion is always permissions. Are there any special permissions required? (It feels odd that so much else works on the site but this, so I’m doubtful, but that’s one idea…)

Nginx.

I have pinged @ben about this one… he’ll get back to you tomorrow morning (as it’s rather late here now). Stay tuned!

Much appreciated!

Hi @Jupeman

I’ve taken a look at your live site and noticed that the “Load More” button is returning the homepage instead of the expected collection data.

This button makes a POST request to: https://alpha.gencryo.com/rw/elements/com.realmac.corepack/api/index.php/cms/collections/items

The request includes a payload with information about the collection, and it should return a JSON response containing additional items.

In your case, however, the request is returning the homepage HTML content — which suggests something on your server is intercepting or misrouting the request. Since this is a self-managed server, I suspect it might be due to .htaccess rules (if you’re using Apache) or a misconfigured nginx block that’s redirecting or rewriting requests unexpectedly.

You might want to double-check your server configuration to ensure requests to the API endpoint are not being caught and redirected by a broader rule. Hope that helps :slight_smile:

Perfect, this was enough to quickly fix my Nginx configuration. I am by no means an Nginx config expert, but I did have to set up specific location parameters for Elements. They weren’t handling everything as my “Load More” issue revealed. Here’s my updated Elements-specific location block that seems to be working (hopefully this may help others down the line):

location ^~ /rw/elements/com.realmac.corepack/api/ {
include fastcgi_params;
fastcgi_split_path_info ^(/rw/elements/com.realmac.corepack/api/index.php)(/.*)?$;
fastcgi_pass php_handler;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param QUERY_STRING $query_string;
}

This line is specifically what fixed my “Load More” problem: fastcgi_split_path_info ^(/rw/elements/com.realmac.corepack/api/index.php)(/.*)?$;

2 Likes